@@ -144,10 +144,10 @@ discard block |
||
144 | 144 | elseif ($results instanceof BSONDocument) { |
145 | 145 | $results = $results->getArrayCopy(); |
146 | 146 | |
147 | - return $this->model->newFromBuilder((array) $results); |
|
147 | + return $this->model->newFromBuilder((array)$results); |
|
148 | 148 | } // The result is a single object. |
149 | 149 | elseif (is_array($results) && array_key_exists('_id', $results)) { |
150 | - return $this->model->newFromBuilder((array) $results); |
|
150 | + return $this->model->newFromBuilder((array)$results); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | return $results; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | protected function addUpdatedAtColumn(array $values) |
165 | 165 | { |
166 | - if (! $this->model->usesTimestamps() || $this->model->getUpdatedAtColumn() === null) { |
|
166 | + if (!$this->model->usesTimestamps() || $this->model->getUpdatedAtColumn() === null) { |
|
167 | 167 | return $values; |
168 | 168 | } |
169 | 169 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public function getAttribute($key) |
42 | 42 | { |
43 | 43 | // This checks for embedded relation support. |
44 | - if (method_exists($this, $key) && ! method_exists(self::class, $key)) { |
|
44 | + if (method_exists($this, $key) && !method_exists(self::class, $key)) { |
|
45 | 45 | return $this->getRelationValue($key); |
46 | 46 | } |
47 | 47 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function performInsert(Model $model) |
37 | 37 | { |
38 | 38 | // Generate a new key if needed. |
39 | - if ($model->getKeyName() == '_id' && ! $model->getKey()) { |
|
39 | + if ($model->getKeyName() == '_id' && !$model->getKey()) { |
|
40 | 40 | $model->setAttribute('_id', new ObjectID); |
41 | 41 | } |
42 | 42 |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $ids = $ids->all(); |
180 | 180 | } |
181 | 181 | |
182 | - if (! is_array($ids)) { |
|
182 | + if (!is_array($ids)) { |
|
183 | 183 | $ids = [$ids]; |
184 | 184 | } |
185 | 185 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $attributes = $this->parent->getAttributes(); |
202 | 202 | |
203 | 203 | // Get embedded models form parent attributes. |
204 | - $embedded = isset($attributes[$this->localKey]) ? (array) $attributes[$this->localKey] : null; |
|
204 | + $embedded = isset($attributes[$this->localKey]) ? (array)$attributes[$this->localKey] : null; |
|
205 | 205 | |
206 | 206 | return $embedded; |
207 | 207 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $connection = $this->related->getConnection(); |
272 | 272 | |
273 | 273 | $model = $this->related->newFromBuilder( |
274 | - (array) $attributes, |
|
274 | + (array)$attributes, |
|
275 | 275 | $connection ? $connection->getName() : null |
276 | 276 | ); |
277 | 277 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function performInsert(Model $model) |
40 | 40 | { |
41 | 41 | // Generate a new key if needed. |
42 | - if ($model->getKeyName() == '_id' && ! $model->getKey()) { |
|
42 | + if ($model->getKeyName() == '_id' && !$model->getKey()) { |
|
43 | 43 | $model->setAttribute('_id', new ObjectID); |
44 | 44 | } |
45 | 45 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function associate(Model $model) |
127 | 127 | { |
128 | - if (! $this->contains($model)) { |
|
128 | + if (!$this->contains($model)) { |
|
129 | 129 | return $this->associateNew($model); |
130 | 130 | } |
131 | 131 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | protected function associateNew($model) |
229 | 229 | { |
230 | 230 | // Create a new key if needed. |
231 | - if ($model->getKeyName() === '_id' && ! $model->getAttribute('_id')) { |
|
231 | + if ($model->getKeyName() === '_id' && !$model->getAttribute('_id')) { |
|
232 | 232 | $model->setAttribute('_id', new ObjectID); |
233 | 233 | } |
234 | 234 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | protected function setEmbedded($models) |
313 | 313 | { |
314 | - if (! is_array($models)) { |
|
314 | + if (!is_array($models)) { |
|
315 | 315 | $models = [$models]; |
316 | 316 | } |
317 | 317 |