@@ -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. |
@@ -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 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function getResults() |
| 21 | 21 | { |
| 22 | - return ! empty($this->child->{$this->foreignKey}) |
|
| 22 | + return !empty($this->child->{$this->foreignKey}) |
|
| 23 | 23 | ? $this->get() |
| 24 | 24 | : $this->related->newCollection(); |
| 25 | 25 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | protected function relationExistenceQueryOwnerKey(Builder $query, $ownerKey) |
| 160 | 160 | { |
| 161 | - if (! $this->key) { |
|
| 161 | + if (!$this->key) { |
|
| 162 | 162 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($ownerKey)); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function getResults() |
| 21 | 21 | { |
| 22 | - return ! is_null($this->getParentKey()) |
|
| 22 | + return !is_null($this->getParentKey()) |
|
| 23 | 23 | ? $this->get() |
| 24 | 24 | : $this->related->newCollection(); |
| 25 | 25 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $keys = $this->getKeys($models, $this->localKey); |
| 54 | 54 | |
| 55 | - $this->query->where(function (Builder $query) use ($keys) { |
|
| 55 | + $this->query->where(function(Builder $query) use ($keys) { |
|
| 56 | 56 | foreach ($keys as $key) { |
| 57 | 57 | if ($this->key) { |
| 58 | 58 | $key = [[$this->key => $key]]; |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | $parentKey = $this->getQualifiedParentKeyName(); |
| 178 | 178 | |
| 179 | - if (! $this->key) { |
|
| 179 | + if (!$this->key) { |
|
| 180 | 180 | return $this->getJsonGrammar($query)->compileJsonArray($query->qualifyColumn($parentKey)); |
| 181 | 181 | } |
| 182 | 182 | |