@@ -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 |
@@ -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 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | ->where($this->key, $parent->{$this->localKey}) |
26 | 26 | ->first(); |
27 | 27 | |
28 | - return ! is_null($record) ? Arr::except($record, $this->key) : []; |
|
28 | + return !is_null($record) ? Arr::except($record, $this->key) : []; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $keys = $this->getKeys($models, $this->localKey); |
58 | 58 | |
59 | - $this->query->where(function (Builder $query) use ($keys) { |
|
59 | + $this->query->where(function(Builder $query) use ($keys) { |
|
60 | 60 | foreach ($keys as $key) { |
61 | 61 | if ($this->key) { |
62 | 62 | $key = [[$this->key => $key]]; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | $parentKey = $this->getQualifiedParentKeyName(); |
181 | 181 | |
182 | - if (! $this->key) { |
|
182 | + if (!$this->key) { |
|
183 | 183 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($parentKey)); |
184 | 184 | } |
185 | 185 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | class BelongsTo extends Base |
9 | 9 | { |
10 | - use IsPostgresRelation; |
|
10 | + use IsPostgresRelation; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Add the constraints for a relationship query. |