Passed
Push — master ( 32f7d5...d8165d )
by Robson
01:25
created
example/save_example.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 
24 24
 print "update user";
25 25
 
26
-$name = ["Robson", "Kaue", "Gustavo", "João"];
26
+$name = [ "Robson", "Kaue", "Gustavo", "João" ];
27 27
 
28 28
 $user = (new User())->findById(100);
29
-$user->first_name = $name[rand(0, 3)];
29
+$user->first_name = $name[ rand(0, 3) ];
30 30
 $user->save();
31 31
 
32 32
 var_dump($user);
Please login to merge, or discard this patch.
src/DataLayer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
      */
252 252
     protected function required(): bool
253 253
     {
254
-        $data = (array)$this->data();
254
+        $data = (array) $this->data();
255 255
         foreach ($this->required as $field) {
256
-            if (empty($data[$field])) {
256
+            if (empty($data[ $field ])) {
257 257
                 return false;
258 258
             }
259 259
         }
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
      */
266 266
     protected function safe(): ?array
267 267
     {
268
-        $safe = (array)$this->data;
269
-        foreach ([$this->primary, "updated_at", "created_at"] as $unset) {
270
-            unset($safe[$unset]);
268
+        $safe = (array) $this->data;
269
+        foreach ([ $this->primary, "updated_at", "created_at" ] as $unset) {
270
+            unset($safe[ $unset ]);
271 271
         }
272 272
 
273 273
         return $safe;
Please login to merge, or discard this patch.
src/CrudTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
     protected function update(array $data, string $terms, string $params): ?int
38 38
     {
39 39
         try {
40
-            $dateSet = [];
40
+            $dateSet = [ ];
41 41
             foreach ($data as $bind => $value) {
42
-                $dateSet[] = "{$bind} = :{$bind}";
42
+                $dateSet[ ] = "{$bind} = :{$bind}";
43 43
             }
44 44
             $dateSet = implode(", ", $dateSet);
45 45
             parse_str($params, $params);
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
      */
83 83
     private function filter(array $data): ?array
84 84
     {
85
-        $filter = [];
85
+        $filter = [ ];
86 86
         foreach ($data as $key => $value) {
87
-            $filter[$key] = (is_null($value) ? null : filter_var($value, FILTER_DEFAULT));
87
+            $filter[ $key ] = (is_null($value) ? null : filter_var($value, FILTER_DEFAULT));
88 88
         }
89 89
         return $filter;
90 90
     }
Please login to merge, or discard this patch.
example/Models/Address.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
      */
16 16
     public function __construct()
17 17
     {
18
-        parent::__construct("address", [], 'address_id');
18
+        parent::__construct("address", [ ], 'address_id');
19 19
     }
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
example/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
      */
16 16
     public function __construct()
17 17
     {
18
-        parent::__construct("users", ["first_name", "last_name"]);
18
+        parent::__construct("users", [ "first_name", "last_name" ]);
19 19
     }
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.