Passed
Branch 0.8.x (fca16e)
by Alexander
13:00
created
src/components/Database/Erostrine/Concerns/HasRelations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
      */
178 178
     protected function newRelatedInstance($class)
179 179
     {
180
-        return take(new $class, function ($instance) {
180
+        return take(new $class, function($instance) {
181 181
             if ( ! $instance->getConnectionName()) {
182 182
                 $instance->setConnection($this->connection);
183 183
             }
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Concerns/HasAttributes.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
     protected $attributes = [];
40 40
 
41 41
     /**
42
-	 * The model attribute's original state.
43
-	 * 
44
-	 * @var array $original
45
-	 */
46
-	protected $original = [];
42
+     * The model attribute's original state.
43
+     * 
44
+     * @var array $original
45
+     */
46
+    protected $original = [];
47 47
 
48 48
     /**
49 49
      * Indicates whether attributes are snake cased on arrays.
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Concerns/HasEvents.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
     protected $observables = [];
45 45
     
46 46
     /**
47
-	 * The event dispatcher instance.
48
-	 * 
49
-	 * @var \Syscodes\Components\Contracts\Events\Dispatcher $dispatcher
50
-	 */
51
-	protected static $dispatcher;
47
+     * The event dispatcher instance.
48
+     * 
49
+     * @var \Syscodes\Components\Contracts\Events\Dispatcher $dispatcher
50
+     */
51
+    protected static $dispatcher;
52 52
 
53 53
     /**
54 54
      * Get the observable event names.
Please login to merge, or discard this patch.
components/Database/Erostrine/Relations/Concerns/SupportModelRelations.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,6 +47,6 @@
 block discarded – undo
47 47
      */
48 48
     protected function getDefaultFor(Model $parent)
49 49
     {
50
-       return $this->newRelatedInstanceFor($parent);
50
+        return $this->newRelatedInstanceFor($parent);
51 51
     }
52 52
 }
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Relations/Concerns/AsPivotTable.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
         $instance = new static;
72 72
 
73 73
         $instance->setConnection($parent->getConnectionName())
74
-                 ->setTable($table)
75
-                 ->fill($attributes)
76
-                 ->syncOriginal();
74
+                    ->setTable($table)
75
+                    ->fill($attributes)
76
+                    ->syncOriginal();
77 77
 
78 78
         $instance->pivotParent = $parent;
79 79
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
             return 0;
143 143
         }
144 144
         
145
-        return take($this->getDeleteQuery()->delete(), function () {
145
+        return take($this->getDeleteQuery()->delete(), function() {
146 146
             $this->exists = false;
147 147
             
148 148
             $this->fireModelEvent('deleted', false);
Please login to merge, or discard this patch.
Database/Erostrine/Relations/Concerns/InteractsWithPivotTable.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     protected function formatSyncList(array $records): array
75 75
     {
76
-        return collect($records)->mapKeys(function ($attributes, $id) {
76
+        return collect($records)->mapKeys(function($attributes, $id) {
77 77
             if ( ! is_array($attributes)) {
78 78
                 list($id, $attributes) = [$attributes, []];
79 79
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,9 @@
 block discarded – undo
220 220
         if ( ! is_null($ids)) {
221 221
             $ids = $this->parseWithIds($ids);
222 222
             
223
-            if (empty($ids)) return 0;
223
+            if (empty($ids)) {
224
+                return 0;
225
+            }
224 226
             
225 227
             $query->whereIn($this->relatedKey, $ids);
226 228
         }
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Relations/Relation.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -179,10 +179,10 @@
 block discarded – undo
179 179
     protected function getKeys(array $models, $key = null): array
180 180
     {
181 181
         return collect($models)->map(fn ($value) => $key ? $value->getAttribute($key) : $value->getKey())
182
-                               ->values()
183
-                               ->unique(null, true)
184
-                               ->sort()
185
-                               ->all();
182
+                                ->values()
183
+                                ->unique(null, true)
184
+                                ->sort()
185
+                                ->all();
186 186
     }
187 187
 
188 188
     /**
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Relations/BelongsTo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
         foreach ($models as $model) {
145 145
             if ( ! is_null($value = $model->{$this->foreignKey})) {
146
-                $keys[]= $value;
146
+                $keys[] = $value;
147 147
             }
148 148
         }
149 149
         
Please login to merge, or discard this patch.
src/components/Database/Erostrine/Relations/BelongsToMany.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $defaults = [$this->foreignPivotKey, $this->relatedKey];
246 246
         
247
-        return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
247
+        return collect(array_merge($defaults, $this->pivotColumns))->map(function($column) {
248 248
             return $this->qualifyPivotColumn($column).' as pivot_'.$column;
249 249
         })->unique()->all();
250 250
     }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
      * 
558 558
      * @return static
559 559
      */
560
-    public function wherePivotNull($column, $boolean = 'and', $negative =  false): static
560
+    public function wherePivotNull($column, $boolean = 'and', $negative = false): static
561 561
     {
562 562
         $this->pivotWhereNulls[] = func_get_args();
563 563
 
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
             if (count($result) === count(array_unique($id))) {
748 748
                 return $result;
749 749
             }
750
-        } elseif (! is_null($result)) {
750
+        } elseif ( ! is_null($result)) {
751 751
             return $result;
752 752
         }
753 753
         
Please login to merge, or discard this patch.