@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function getAttribute($key) |
| 20 | 20 | { |
| 21 | - if (! $key) { |
|
| 21 | + if (!$key) { |
|
| 22 | 22 | return; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function detach($ids = null) |
| 36 | 36 | { |
| 37 | - if (! is_null($ids)) { |
|
| 37 | + if (!is_null($ids)) { |
|
| 38 | 38 | $records = array_diff_key( |
| 39 | 39 | $this->decodeRecords(), |
| 40 | 40 | array_flip($this->parseIds($ids)) |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | protected function decodeRecords() |
| 96 | 96 | { |
| 97 | 97 | return collect((array) $this->child->{$this->path}) |
| 98 | - ->mapWithKeys(function ($record) { |
|
| 99 | - if (! is_array($record)) { |
|
| 98 | + ->mapWithKeys(function($record) { |
|
| 99 | + if (!is_array($record)) { |
|
| 100 | 100 | return [$record => []]; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | protected function encodeRecords(array $records) |
| 114 | 114 | { |
| 115 | - if (! $this->key) { |
|
| 115 | + if (!$this->key) { |
|
| 116 | 116 | return array_keys($records); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -154,8 +154,8 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | protected function formatIds(array $ids) |
| 156 | 156 | { |
| 157 | - return collect($ids)->mapWithKeys(function ($attributes, $id) { |
|
| 158 | - if (! is_array($attributes)) { |
|
| 157 | + return collect($ids)->mapWithKeys(function($attributes, $id) { |
|
| 158 | + if (!is_array($attributes)) { |
|
| 159 | 159 | list($id, $attributes) = [$attributes, []]; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | $keys = $this->getKeys($models, $this->localKey); |
| 111 | 111 | |
| 112 | - $this->query->where(function (Builder $query) use ($keys) { |
|
| 112 | + $this->query->where(function(Builder $query) use ($keys) { |
|
| 113 | 113 | foreach ($keys as $key) { |
| 114 | 114 | if ($this->key) { |
| 115 | 115 | $key = [[$this->key => $key]]; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | { |
| 211 | 211 | $parentKey = $this->getQualifiedParentKeyName(); |
| 212 | 212 | |
| 213 | - if (! $this->key) { |
|
| 213 | + if (!$this->key) { |
|
| 214 | 214 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($parentKey)); |
| 215 | 215 | } |
| 216 | 216 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | ->where($this->key, $model->{$this->ownerKey}) |
| 82 | 82 | ->first(); |
| 83 | 83 | |
| 84 | - return ! is_null($record) ? Arr::except($record, $this->key) : []; |
|
| 84 | + return !is_null($record) ? Arr::except($record, $this->key) : []; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | protected function relationExistenceQueryOwnerKey(Builder $query, $ownerKey) |
| 228 | 228 | { |
| 229 | - if (! $this->key) { |
|
| 229 | + if (!$this->key) { |
|
| 230 | 230 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($ownerKey)); |
| 231 | 231 | } |
| 232 | 232 | |