Passed
Push — master ( e7b285...ac21bd )
by noitran
02:40
created
src/Requests/InteractsWithRequest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @return array
19 19
      */
20
-    public function only($keys, array $input = []): array
20
+    public function only($keys, array $input = [ ]): array
21 21
     {
22 22
         $keys = \is_array($keys) ? $keys : \func_get_args();
23 23
 
24
-        $output = [];
24
+        $output = [ ];
25 25
 
26 26
         foreach ($keys as $key) {
27 27
             Arr::set($output, $key, data_get($input, $key));
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return array
40 40
      */
41
-    public function except($keys, array $input = []): array
41
+    public function except($keys, array $input = [ ]): array
42 42
     {
43 43
         $keys = \is_array($keys) ? $keys : \func_get_args();
44 44
 
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return bool
57 57
      */
58
-    public function exists($key, array $input = []): bool
58
+    public function exists($key, array $input = [ ]): bool
59 59
     {
60 60
         $keys = \is_array($key) ? $key : \func_get_args();
61 61
 
62 62
         foreach ($keys as $value) {
63
-            if (! Arr::has($input, $value)) {
63
+            if (!Arr::has($input, $value)) {
64 64
                 return false;
65 65
             }
66 66
         }
Please login to merge, or discard this patch.
src/Criteria/OrderBy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function setOrderByParameters($orderBy): void
45 45
     {
46
-        [$column, $direction] = explode(',', $orderBy);
46
+        [ $column, $direction ] = explode(',', $orderBy);
47 47
 
48 48
         $this->column = $column;
49 49
         $this->direction = $direction ?? 'asc';
50 50
 
51
-        if (! \in_array($this->direction, ['asc', 'desc'])) {
51
+        if (!\in_array($this->direction, [ 'asc', 'desc' ])) {
52 52
             $this->direction = 'asc';
53 53
         }
54 54
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             return $model;
68 68
         }
69 69
 
70
-        if (! preg_match($this->allowedToContain, $this->column)) {
70
+        if (!preg_match($this->allowedToContain, $this->column)) {
71 71
             throw new ValidationException('OrderBy query parameter contains illegal characters.');
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/Filters/AbstractFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     /**
15 15
      * @var array
16 16
      */
17
-    protected $queryFilters = [];
17
+    protected $queryFilters = [ ];
18 18
 
19 19
     /**
20 20
      * @var array
Please login to merge, or discard this patch.
src/Contracts/Repository/RepositoryInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @return mixed
20 20
      */
21
-    public function all($columns = ['*']);
21
+    public function all($columns = [ '*' ]);
22 22
 
23 23
     /**
24 24
      * Get collection of paginated records
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return mixed
32 32
      */
33
-    public function paginate($perPage = null, $columns = ['*']);
33
+    public function paginate($perPage = null, $columns = [ '*' ]);
34 34
 
35 35
     /**
36 36
      * Get single or multiple records by their primary ids
@@ -42,5 +42,5 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @return mixed
44 44
      */
45
-    public function find($id, $columns = ['*']);
45
+    public function find($id, $columns = [ '*' ]);
46 46
 }
Please login to merge, or discard this patch.
src/Repositories/InteractsWithSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function getColumnNames(array $columns, $model = null): array
31 31
     {
32
-        return array_map(function ($column) use ($model) {
32
+        return array_map(function($column) use ($model) {
33 33
             return $this->getColumnName($column, $model);
34 34
         }, $columns);
35 35
     }
Please login to merge, or discard this patch.
src/Repositories/AbstractRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $model = $this->app->make($this->getModelClassName());
95 95
 
96
-        if (! $model instanceof Model) {
96
+        if (!$model instanceof Model) {
97 97
             throw new RepositoryException("Class {$this->getModelClassName()} must be an instance of " . Model::class);
98 98
         }
99 99
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         $criteria = $this->getCriteria();
171 171
 
172
-        if (! $criteria) {
172
+        if (!$criteria) {
173 173
             return $this;
174 174
         }
175 175
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @return EloquentBuilder[]|\Illuminate\Database\Eloquent\Collection|Model[]|mixed
208 208
      */
209
-    public function all($columns = ['*'])
209
+    public function all($columns = [ '*' ])
210 210
     {
211 211
         $this->applyCriteria()
212 212
             ->applyScope();
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      *
234 234
      * @return mixed
235 235
      */
236
-    public function paginate($perPage = null, $columns = ['*'])
236
+    public function paginate($perPage = null, $columns = [ '*' ])
237 237
     {
238 238
         $this->applyCriteria()
239 239
             ->applyScope();
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      *
260 260
      * @return mixed
261 261
      */
262
-    public function find($id, $columns = ['*'])
262
+    public function find($id, $columns = [ '*' ])
263 263
     {
264 264
         $this->applyCriteria()
265 265
             ->applyScope();
Please login to merge, or discard this patch.