@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $results = $this->eloquentRelation->getResults(); |
| 45 | 45 | |
| 46 | 46 | $results->put('emptyResult', ''); |
| 47 | - if (! empty($columns)) { |
|
| 47 | + if (!empty($columns)) { |
|
| 48 | 48 | $readOnly = [Model::CREATED_AT, Model::UPDATED_AT]; |
| 49 | 49 | foreach ($results as $key => $result) { |
| 50 | 50 | $tempFields = []; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $config = [ |
| 67 | 67 | 'name' => $columnName, |
| 68 | - 'presentation' => $this->name . ' ' . ucfirst(transcrud($columnName)) . ' [' . $index . ']', |
|
| 68 | + 'presentation' => $this->name.' '.ucfirst(transcrud($columnName)).' ['.$index.']', |
|
| 69 | 69 | 'form_type' => $formType, |
| 70 | 70 | 'no_validate' => true, |
| 71 | 71 | 'validation' => null, |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $relationModel = $this->eloquentRelation->getRelated()->newInstance(); |
| 90 | - if (! empty($result)) { |
|
| 90 | + if (!empty($result)) { |
|
| 91 | 91 | $relationModel = $result; |
| 92 | 92 | } |
| 93 | 93 | $this->modelAbstractor->setInstance($relationModel); |
| 94 | 94 | $secondaryRelations = $this->getSecondaryRelations(); |
| 95 | - if (! empty($secondaryRelations)) { |
|
| 95 | + if (!empty($secondaryRelations)) { |
|
| 96 | 96 | foreach ($secondaryRelations as $secondaryRelationKey => $secondaryRelation) { |
| 97 | 97 | foreach ($secondaryRelation->getEditFields($secondaryRelationKey) as $editGroupName => $editGroup) { |
| 98 | 98 | if ($secondaryRelation->getType() === 'Anavel\Crud\Abstractor\Eloquent\Relation\Select') { |
@@ -119,12 +119,12 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function persist(array $relationArray = null) |
| 121 | 121 | { |
| 122 | - if (! empty($relationArray)) { |
|
| 122 | + if (!empty($relationArray)) { |
|
| 123 | 123 | $keyName = $this->eloquentRelation->getParent()->getKeyName(); |
| 124 | 124 | $currentRelations = $this->eloquentRelation->get()->keyBy($keyName); |
| 125 | 125 | |
| 126 | 126 | foreach ($relationArray as $relation) { |
| 127 | - if (! empty($relation[$keyName]) |
|
| 127 | + if (!empty($relation[$keyName]) |
|
| 128 | 128 | && ($currentRelations->has($relation[$keyName])) |
| 129 | 129 | ) { |
| 130 | 130 | $relationModel = $currentRelations->get($relation[$keyName]); |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | $relationModel->setAttribute($fieldKey, $fieldValue); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - if (! $shouldBeSkipped) { |
|
| 158 | + if (!$shouldBeSkipped) { |
|
| 159 | 159 | $relationModel->save(); |
| 160 | 160 | |
| 161 | - if (! $delayedRelations->isEmpty()) { |
|
| 161 | + if (!$delayedRelations->isEmpty()) { |
|
| 162 | 162 | foreach ($delayedRelations as $relationKey => $delayedRelation) { |
| 163 | 163 | /** @var RelationContract $secondaryRelation */ |
| 164 | 164 | $secondaryRelation = $secondaryRelations->get($relationKey); |