Passed
Pull Request — master (#40)
by Giacomo
05:03
created
src/Eloquent/Builder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Eloquent/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Relationships/EmbedsOne.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Relationships/EmbedsOneOrMany.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Relationships/EmbedsMany.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.