Passed
Push — 0.8.x ( 68625b...156d51 )
by Alexander
06:01 queued 03:01
created
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.
src/components/Container/Container.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -585,8 +585,8 @@
 block discarded – undo
585 585
     protected function buildNotInstantiable(string $class): mixed
586 586
     {
587 587
         if ( ! empty($this->buildStack)) {
588
-           $reset   = implode(', ', $this->buildStack);
589
-           $message = "Target [{$class}] is not instantiable while building [{$reset}]"; 
588
+            $reset   = implode(', ', $this->buildStack);
589
+            $message = "Target [{$class}] is not instantiable while building [{$reset}]"; 
590 590
         } else {
591 591
             $message = "Target [{$class}] is not instantiable";
592 592
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      * 
211 211
      * @return void
212 212
      */
213
-    public function bind($id, Closure|string $value = null, bool $singleton = false): void
213
+    public function bind($id, Closure | string $value = null, bool $singleton = false): void
214 214
     {   
215 215
         $this->dropInstances($id);
216 216
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      */
256 256
     protected function getClosure($id, string $value): mixed
257 257
     {
258
-        return function ($container, $parameters = []) use ($id, $value) {
258
+        return function($container, $parameters = []) use ($id, $value) {
259 259
             if ($id == $value) {
260 260
                 return $container->build($value);
261 261
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,9 @@
 block discarded – undo
173 173
     {
174 174
         $this->hasCallbacks[$id = $this->getAlias($id)][] = $callback;
175 175
         
176
-        if ($this->bound($id)) return $this->make($id);
176
+        if ($this->bound($id)) {
177
+            return $this->make($id);
178
+        }
177 179
     }
178 180
 
179 181
     /**
Please login to merge, or discard this patch.
src/components/Container/Util.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      * 
51 51
      * @return string|null
52 52
      */
53
-    public static function getParameterClassName($parameter): string|null
53
+    public static function getParameterClassName($parameter): string | null
54 54
     {
55 55
         $type = $parameter->getType();
56 56
         
Please login to merge, or discard this patch.
src/components/Support/Flowing.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -168,61 +168,61 @@
 block discarded – undo
168 168
     }
169 169
 
170 170
     /**
171
-	 * Magic method. 
171
+     * Magic method. 
172 172
      * 
173 173
      * Searches for the given variable and returns its value.
174
-	 *
175
-	 * @param  string  $key  Variable name
176
-	 *
177
-	 * @return mixed
178
-	 */
179
-	public function __get($key) 
180
-	{
181
-		return $this->get($key);
182
-	}
183
-
184
-	/**
185
-	 * Magic method. 
174
+     *
175
+     * @param  string  $key  Variable name
176
+     *
177
+     * @return mixed
178
+     */
179
+    public function __get($key) 
180
+    {
181
+        return $this->get($key);
182
+    }
183
+
184
+    /**
185
+     * Magic method. 
186 186
      * 
187 187
      * Calls [$this->set] with the same parameters.
188
-	 *
189
-	 * @param  string  $key    Variable name
190
-	 * @param  mixed   $value  Value
191
-	 *
192
-	 * @return void
193
-	 */
194
-	public function __set($key, $value) 
195
-	{
196
-		$this->offsetSet($key, $value);
197
-	}
198
-
199
-	/**
200
-	 * Magic method. 
188
+     *
189
+     * @param  string  $key    Variable name
190
+     * @param  mixed   $value  Value
191
+     *
192
+     * @return void
193
+     */
194
+    public function __set($key, $value) 
195
+    {
196
+        $this->offsetSet($key, $value);
197
+    }
198
+
199
+    /**
200
+     * Magic method. 
201 201
      * 
202 202
      * Determines if a variable is set.
203
-	 *
204
-	 * @param  string  $key  variable name
205
-	 *
206
-	 * @return boolean
207
-	 */
208
-	public function __isset($key) 
209
-	{
210
-		return $this->offsetExists($key);
211
-	}
212
-
213
-	/**
214
-	 * Magic method. 
203
+     *
204
+     * @param  string  $key  variable name
205
+     *
206
+     * @return boolean
207
+     */
208
+    public function __isset($key) 
209
+    {
210
+        return $this->offsetExists($key);
211
+    }
212
+
213
+    /**
214
+     * Magic method. 
215 215
      * 
216 216
      * Unsets a given variable.
217
-	 *
218
-	 * @param  string  $key  Variable name
219
-	 *
220
-	 * @return void
221
-	 */
222
-	public function __unset($key) 
223
-	{
224
-		$this->offsetUnset($$key);
225
-	}
217
+     *
218
+     * @param  string  $key  Variable name
219
+     *
220
+     * @return void
221
+     */
222
+    public function __unset($key) 
223
+    {
224
+        $this->offsetUnset($$key);
225
+    }
226 226
 
227 227
     /**
228 228
      * Magic method.
Please login to merge, or discard this patch.
src/components/Support/InflectRules/Rules.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function replace($replaceMap, $keepMap, $rules): Closure
73 73
     {
74
-        return function ($word) use ($replaceMap, $keepMap, $rules) {
74
+        return function($word) use ($replaceMap, $keepMap, $rules) {
75 75
             $token = strtolower($word);
76 76
             
77 77
             if (array_key_exists($token, $keepMap)) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function checkWord($replaceMap, $keepMap, $rules): Closure
99 99
     {
100
-        return function ($word) use ($replaceMap, $keepMap, $rules) {
100
+        return function($word) use ($replaceMap, $keepMap, $rules) {
101 101
             $token = strtolower($word);
102 102
             
103 103
             if (array_key_exists($token, $keepMap)) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function replaceWord($word, $rule): string
124 124
     {
125
-        return preg_replace_callback($rule[0], function ($matches) use ($word, $rule) {
125
+        return preg_replace_callback($rule[0], function($matches) use ($word, $rule) {
126 126
             if ( ! isset($matches[0])) {
127 127
                 return $word;
128 128
             }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     protected function interpolate($str, $args)
150 150
     {
151
-        return preg_replace_callback('/\$(\d{1,2})/', function ($matches) use ($args) {
151
+        return preg_replace_callback('/\$(\d{1,2})/', function($matches) use ($args) {
152 152
             return isset($matches[1], $args[$matches[1]])
153 153
                         ? $args[$matches[1]]
154 154
                         : "";
Please login to merge, or discard this patch.