Passed
Push — master ( 07917c...07b1c4 )
by Robson
01:22
created
example/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct()
10 10
     {
11
-        parent::__construct("users", ["first_name", "last_name"]);
11
+        parent::__construct("users", [ "first_name", "last_name" ]);
12 12
     }
13 13
 }
14 14
\ No newline at end of file
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
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct()
10 10
     {
11
-        parent::__construct("address", [], 'address_id');
11
+        parent::__construct("address", [ ], 'address_id');
12 12
     }
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
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/CrudTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
     protected function update(array $data, string $terms, string $params): ?int
24 24
     {
25 25
         try {
26
-            $dateSet = [];
26
+            $dateSet = [ ];
27 27
             foreach ($data as $bind => $value) {
28
-                $dateSet[] = "{$bind} = :{$bind}";
28
+                $dateSet[ ] = "{$bind} = :{$bind}";
29 29
             }
30 30
             $dateSet = implode(", ", $dateSet);
31 31
             parse_str($params, $params);
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function filter(array $data): ?array
61 61
     {
62
-        $filter = [];
62
+        $filter = [ ];
63 63
         foreach ($data as $key => $value) {
64
-            $filter[$key] = (is_null($value) ? null : filter_var($value, FILTER_DEFAULT));
64
+            $filter[ $key ] = (is_null($value) ? null : filter_var($value, FILTER_DEFAULT));
65 65
         }
66 66
         return $filter;
67 67
     }
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
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 
156 156
     protected function required(): bool
157 157
     {
158
-        $data = (array)$this->data();
158
+        $data = (array) $this->data();
159 159
         foreach ($this->required as $field) {
160
-            if (empty($data[$field])) {
160
+            if (empty($data[ $field ])) {
161 161
                 return false;
162 162
             }
163 163
         }
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 
167 167
     protected function safe(): ?array
168 168
     {
169
-        $safe = (array)$this->data;
170
-        foreach ([$this->primary, "updated_at", "created_at"] as $unset) {
171
-            unset($safe[$unset]);
169
+        $safe = (array) $this->data;
170
+        foreach ([ $this->primary, "updated_at", "created_at" ] as $unset) {
171
+            unset($safe[ $unset ]);
172 172
         }
173 173
 
174 174
         return $safe;
Please login to merge, or discard this patch.