We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -387,7 +387,7 @@ |
||
| 387 | 387 | $model = $model->$part(); |
| 388 | 388 | |
| 389 | 389 | if(! is_a($model, \Illuminate\Database\Eloquent\Relations\Relation::class, true)) { |
| 390 | - return true; |
|
| 390 | + return true; |
|
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | $model = $model->getRelated(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // here we are going to iterate through all relation parts to check |
| 25 | 25 | foreach ($parts as $i => $part) { |
| 26 | 26 | $relation = $model->$part(); |
| 27 | - if (! is_a($relation, \Illuminate\Database\Eloquent\Relations\Relation::class, true)) { |
|
| 27 | + if (!is_a($relation, \Illuminate\Database\Eloquent\Relations\Relation::class, true)) { |
|
| 28 | 28 | return $model; |
| 29 | 29 | } |
| 30 | 30 | $model = $relation->getRelated(); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $model = new ($this->getRelationModel($entity, -1)); |
| 69 | 69 | $lastSegmentAfterDot = Str::of($field['entity'])->afterLast('.')->value(); |
| 70 | 70 | |
| 71 | - if (! $this->modelMethodIsRelationship($model, $lastSegmentAfterDot)) { |
|
| 71 | + if (!$this->modelMethodIsRelationship($model, $lastSegmentAfterDot)) { |
|
| 72 | 72 | return (string) Str::of($field['entity'])->beforeLast('.'); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | return collect($this->getCleanStateFields()) |
| 91 | 91 | ->whereIn('relation_type', $relation_types) |
| 92 | - ->filter(function ($item) use ($nested) { |
|
| 92 | + ->filter(function($item) use ($nested) { |
|
| 93 | 93 | if ($nested) { |
| 94 | 94 | return true; |
| 95 | 95 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | private function getRelationFieldsWithoutRelationType($relations, $fields = []) |
| 135 | 135 | { |
| 136 | - if (! is_array($relations)) { |
|
| 136 | + if (!is_array($relations)) { |
|
| 137 | 137 | $relations = [$relations]; |
| 138 | 138 | } |
| 139 | 139 | |
@@ -142,8 +142,8 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | foreach ($relations as $relation) { |
| 145 | - $fields = array_filter($fields, function ($field) use ($relation) { |
|
| 146 | - if (! isset($field['relation_type'])) { |
|
| 145 | + $fields = array_filter($fields, function($field) use ($relation) { |
|
| 146 | + if (!isset($field['relation_type'])) { |
|
| 147 | 147 | return false; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $fields = array_merge($field['subfields'], $fields); |
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | - $fields = array_filter($fields, function ($field) { |
|
| 180 | + $fields = array_filter($fields, function($field) { |
|
| 181 | 181 | return isset($field['relation_type']) && $field['relation_type'] === 'BelongsTo'; |
| 182 | 182 | }); |
| 183 | 183 | } |
@@ -244,8 +244,8 @@ discard block |
||
| 244 | 244 | { |
| 245 | 245 | $all_relation_fields = $this->getRelationFields(); |
| 246 | 246 | |
| 247 | - return Arr::where($all_relation_fields, function ($value, $key) { |
|
| 248 | - return isset($value['pivot']) && ! $value['pivot']; |
|
| 247 | + return Arr::where($all_relation_fields, function($value, $key) { |
|
| 248 | + return isset($value['pivot']) && !$value['pivot']; |
|
| 249 | 249 | }); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | { |
| 259 | 259 | $all_relation_fields = $this->getRelationFields(); |
| 260 | 260 | |
| 261 | - return Arr::where($all_relation_fields, function ($value, $key) { |
|
| 261 | + return Arr::where($all_relation_fields, function($value, $key) { |
|
| 262 | 262 | return isset($value['pivot']) && $value['pivot']; |
| 263 | 263 | }); |
| 264 | 264 | } |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | private function modelMethodIsRelationship($model, $method) |
| 330 | 330 | { |
| 331 | - if (! method_exists($model, $method)) { |
|
| 332 | - if($model->isRelation($method)) { |
|
| 331 | + if (!method_exists($model, $method)) { |
|
| 332 | + if ($model->isRelation($method)) { |
|
| 333 | 333 | return $method; |
| 334 | 334 | } |
| 335 | 335 | return false; |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | // relationships are always public methods. |
| 346 | - if (! $methodReflection->isPublic()) { |
|
| 346 | + if (!$methodReflection->isPublic()) { |
|
| 347 | 347 | return false; |
| 348 | 348 | } |
| 349 | 349 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | public function isAttributeInRelationString(array $field): bool |
| 372 | 372 | { |
| 373 | - if (! str_contains($field['entity'], '.')) { |
|
| 373 | + if (!str_contains($field['entity'], '.')) { |
|
| 374 | 374 | return false; |
| 375 | 375 | } |
| 376 | 376 | |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | try { |
| 387 | 387 | $model = $model->$part(); |
| 388 | 388 | |
| 389 | - if(! is_a($model, \Illuminate\Database\Eloquent\Relations\Relation::class, true)) { |
|
| 389 | + if (!is_a($model, \Illuminate\Database\Eloquent\Relations\Relation::class, true)) { |
|
| 390 | 390 | return true; |
| 391 | 391 | } |
| 392 | 392 | |