@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $keys = []; |
| 68 | 68 | |
| 69 | 69 | foreach ($models as $model) { |
| 70 | - if (! is_null($value = ModelAccessor::get($model, $this->foreignKey))) { |
|
| 70 | + if (!is_null($value = ModelAccessor::get($model, $this->foreignKey))) { |
|
| 71 | 71 | $keys[] = $value; |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | { |
| 130 | 130 | $foreign = $this->foreignKey; |
| 131 | 131 | |
| 132 | - return collect($this->dictionary[$type])->map(function ($models) use ($foreign) { |
|
| 132 | + return collect($this->dictionary[$type])->map(function($models) use ($foreign) { |
|
| 133 | 133 | return ModelAccessor::get(head($models), $foreign); |
| 134 | 134 | })->values()->unique(); |
| 135 | 135 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if (count($result) == count(array_unique($id))) { |
| 67 | 67 | return $result; |
| 68 | 68 | } |
| 69 | - } elseif (! is_null($result)) { |
|
| 69 | + } elseif (!is_null($result)) { |
|
| 70 | 70 | return $result; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function firstSimpleOrFail($columns = ['*']) |
| 98 | 98 | { |
| 99 | - if (! is_null($model = $this->firstSimple($columns))) { |
|
| 99 | + if (!is_null($model = $this->firstSimple($columns))) { |
|
| 100 | 100 | return $model; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -514,11 +514,11 @@ |
||
| 514 | 514 | */ |
| 515 | 515 | protected function guessBelongsToManyRelation() |
| 516 | 516 | { |
| 517 | - $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($trace) { |
|
| 518 | - return ! in_array($trace['function'], Model::$manyMethods); |
|
| 517 | + $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function($trace) { |
|
| 518 | + return !in_array($trace['function'], Model::$manyMethods); |
|
| 519 | 519 | }); |
| 520 | 520 | |
| 521 | - return ! is_null($caller) ? $caller['function'] : null; |
|
| 521 | + return !is_null($caller) ? $caller['function'] : null; |
|
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | protected function getKeys(array $models, $key = null) |
| 73 | 73 | { |
| 74 | - return array_unique(array_values(array_map(function ($value) use ($key) { |
|
| 74 | + return array_unique(array_values(array_map(function($value) use ($key) { |
|
| 75 | 75 | return $key ? ModelAccessor::get($value, $key) : ModelAccessor::get($value, $this->parent->getKeyName()); |
| 76 | 76 | }, $models))); |
| 77 | 77 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | return $models; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - return array_combine(array_map(function ($model) { |
|
| 123 | + return array_combine(array_map(function($model) { |
|
| 124 | 124 | return (new $model)->getTable(); |
| 125 | 125 | }, $models), $models); |
| 126 | 126 | } |