Skip to content

Commit

Permalink
Fix StyleCI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayMurha committed Aug 30, 2022
1 parent 4e7d41b commit 8015ed7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Field implements Renderable
const FILE_SORT_FLAG = '_file_sort_';

/**
* Uniq id for field container
* Uniq id for field container.
*
* @var string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BelongsToMany extends MultipleSelect
use BelongsToRelation;

protected $variables = [
'multiple' => true
'multiple' => true,
];

protected function addScript()
Expand Down
12 changes: 7 additions & 5 deletions src/Form/Field/MorphTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class MorphTo extends BelongsTo

public function __construct($morphName, $arguments = [])
{
$this->typeColumn = $morphName . '_type';
$column = $morphName . '_id';
$this->typeColumn = $morphName.'_type';
$column = $morphName.'_id';
parent::__construct($column, $arguments);

if (empty($arguments[1])) {
Expand All @@ -22,7 +22,7 @@ public function __construct($morphName, $arguments = [])

$this->addVariables([
'typeColumn' => $this->typeColumn,
'morphClass' => $this->morphClass()
'morphClass' => $this->morphClass(),
]);
}

Expand All @@ -32,9 +32,10 @@ public function __construct($morphName, $arguments = [])
public function morphClass()
{
if (!$this->morphClass) {
$modelClass = (new $this->selectable)->model;
$this->morphClass = (new $modelClass)->getMorphClass();
$modelClass = (new $this->selectable())->model;
$this->morphClass = (new $modelClass())->getMorphClass();
}

return $this->morphClass;
}

Expand All @@ -47,6 +48,7 @@ public function value($value = null)
if ($this->currenMorphClass() == $this->morphClass()) {
return parent::value();
}

return null;
}

Expand Down

0 comments on commit 8015ed7

Please sign in to comment.