@@ -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 |
@@ -162,7 +162,7 @@ |
||
162 | 162 | */ |
163 | 163 | protected function relationExistenceQueryOwnerKey(Builder $query, $ownerKey) |
164 | 164 | { |
165 | - if (! $this->key) { |
|
165 | + if (!$this->key) { |
|
166 | 166 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($ownerKey)); |
167 | 167 | } |
168 | 168 |
@@ -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 | [$id, $attributes] = [$attributes, []]; |
160 | 160 | } |
161 | 161 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $models = parent::get($columns); |
66 | 66 | |
67 | - if ($this->key && ! empty($this->parent->getAttributes())) { |
|
67 | + if ($this->key && !empty($this->parent->getAttributes())) { |
|
68 | 68 | $this->hydratePivotRelation($models, $this->parent); |
69 | 69 | } |
70 | 70 |