Completed
Push — master ( 689cb9...8b5241 )
by Andrey
02:26
created
src/Relations/BelongsTo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $keys = [];
68 68
 
69 69
         foreach ($models as $model) {
70
-            if (! is_null($value = ModelAccessor::get($model, $this->foreignKey))) {
70
+            if (!is_null($value = ModelAccessor::get($model, $this->foreignKey))) {
71 71
                 $keys[] = $value;
72 72
             }
73 73
         }
Please login to merge, or discard this patch.
src/Relations/Relation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     protected function getKeys(array $models, $key = null)
65 65
     {
66
-        return array_unique(array_values(array_map(function ($value) use ($key) {
66
+        return array_unique(array_values(array_map(function($value) use ($key) {
67 67
             return $key ? ModelAccessor::get($value, $key) : ModelAccessor::get($value, $this->parent->getKeyName());
68 68
         }, $models)));
69 69
     }
Please login to merge, or discard this patch.
src/Relations/MorphTo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
     {
130 130
         $foreign = $this->foreignKey;
131 131
 
132
-        return collect($this->dictionary[$type])->map(function ($models) use ($foreign) {
132
+        return collect($this->dictionary[$type])->map(function($models) use ($foreign) {
133 133
             return ModelAccessor::get(head($models), $foreign);
134 134
         })->values()->unique();
135 135
     }
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             if (count($result) == count(array_unique($id))) {
67 67
                 return $result;
68 68
             }
69
-        } elseif (! is_null($result)) {
69
+        } elseif (!is_null($result)) {
70 70
             return $result;
71 71
         }
72 72
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function firstSimpleOrFail($columns = ['*'])
98 98
     {
99
-        if (! is_null($model = $this->firstSimple($columns))) {
99
+        if (!is_null($model = $this->firstSimple($columns))) {
100 100
             return $model;
101 101
         }
102 102
 
Please login to merge, or discard this patch.
src/Relations/HasRelationships.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
      * @return BelongsToMany
377 377
      */
378 378
     public function belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null,
379
-                                  $parentKey = null, $relatedKey = null, $relation = null)
379
+                                    $parentKey = null, $relatedKey = null, $relation = null)
380 380
     {
381 381
         if (is_null($relation)) {
382 382
             $relation = $this->guessBelongsToManyRelation();
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
      * @return MorphToMany
475 475
      */
476 476
     protected function newMorphToMany(Builder $query, Model $parent, $name, $table, $foreignPivotKey,
477
-                                      $relatedPivotKey, $parentKey, $relatedKey,
478
-                                      $relationName = null, $inverse = false)
477
+                                        $relatedPivotKey, $parentKey, $relatedKey,
478
+                                        $relationName = null, $inverse = false)
479 479
     {
480 480
         return new MorphToMany($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey,
481 481
             $relationName, $inverse);
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
      * @return MorphToMany
495 495
      */
496 496
     public function morphedByMany($related, $name, $table = null, $foreignPivotKey = null,
497
-                                  $relatedPivotKey = null, $parentKey = null, $relatedKey = null)
497
+                                    $relatedPivotKey = null, $parentKey = null, $relatedKey = null)
498 498
     {
499 499
         $foreignPivotKey = $foreignPivotKey ?: $this->getForeignKey();
500 500
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -514,11 +514,11 @@
 block discarded – undo
514 514
      */
515 515
     protected function guessBelongsToManyRelation()
516 516
     {
517
-        $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($trace) {
518
-            return ! in_array($trace['function'], Model::$manyMethods);
517
+        $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function($trace) {
518
+            return !in_array($trace['function'], Model::$manyMethods);
519 519
         });
520 520
 
521
-        return ! is_null($caller) ? $caller['function'] : null;
521
+        return !is_null($caller) ? $caller['function'] : null;
522 522
     }
523 523
 
524 524
     /**
Please login to merge, or discard this patch.