Passed
Push — main ( 0dc4a1...25ab27 )
by Proyecto
03:00
created
tools/functions.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
     $file = array_pop($parts);
51 51
     $dir = '';
52 52
     foreach ($parts as $part) {
53
-        if (!is_dir($dir .= "$part/")) mkdir($dir);
53
+        if (!is_dir($dir .= "$part/")) {
54
+            mkdir($dir);
55
+        }
54 56
     }
55 57
     if( is_file($destination) ){
56 58
         rename($destination, $destination . '.bak');
Please login to merge, or discard this patch.
src/TAU/Common/InMemoryRepository.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -251,10 +251,11 @@  discard block
 block discarded – undo
251 251
             'available' => $available
252 252
         ];
253 253
 
254
-        foreach($from as $xKey => $xs)
255
-            foreach($xs as $yKey => $pair)
254
+        foreach($from as $xKey => $xs) {
255
+                    foreach($xs as $yKey => $pair)
256 256
                 if( $yKey === $entityY->getId() ) {
257 257
                     $r[$who][$xKey] = $pair[0];
258
+        }
258 259
                     unset($r['available'][$xKey]);
259 260
                 }
260 261
 
@@ -268,10 +269,11 @@  discard block
 block discarded – undo
268 269
             'available' => $available
269 270
         ];
270 271
 
271
-        foreach($from as $xKey => $xs)
272
-            foreach($xs as $yKey => $pair)
272
+        foreach($from as $xKey => $xs) {
273
+                    foreach($xs as $yKey => $pair)
273 274
                 if ($xKey === $entityX->getId()) {
274 275
                     $r[$who][$yKey] = $pair[1];
276
+        }
275 277
                     unset($r['available'][$yKey]);
276 278
                 }
277 279
 
Please login to merge, or discard this patch.
src/TAU/Common/SettersBag.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         if( in_array($name, ['setPropertiesBag', 'setSettersBag'], true) ){
27 27
             $this->$name(...$arguments);
28 28
             return;
29
-        }elseif( in_array($name, ['getPropertiesBag','getSettersBag'], true) ){
29
+        } elseif( in_array($name, ['getPropertiesBag','getSettersBag'], true) ){
30 30
             return $this->$name(...$arguments);
31 31
         }
32 32
 
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
         foreach ($this->setters as $getter){
56 56
             if( $this->isGetter($getter) )
57 57
             {
58
-                if( $this->$getter() != $o->$getter() )
59
-                    return false;
58
+                if( $this->$getter() != $o->$getter() ) {
59
+                                    return false;
60
+                }
60 61
             }
61 62
         }
62 63
         return true;
Please login to merge, or discard this patch.
src/TAU/Common/SQLiteRepository.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -117,8 +117,9 @@  discard block
 block discarded – undo
117 117
         $this->executeOrFail($ps, [':user_id' => $id]);
118 118
 
119 119
         $resultSet = $ps->fetch(PDO::FETCH_ASSOC);
120
-        if( $resultSet === false )
121
-            throw new \InvalidArgumentException("User with id = $id not found");
120
+        if( $resultSet === false ) {
121
+                    throw new \InvalidArgumentException("User with id = $id not found");
122
+        }
122 123
 
123 124
         $ref = new \ReflectionClass(User::class);
124 125
         $user = $this->castUser($ref->newInstanceWithoutConstructor());
@@ -282,8 +283,9 @@  discard block
 block discarded – undo
282 283
         $this->executeOrFail($ps, [':group_id' => $id]);
283 284
 
284 285
         $resultSet = $ps->fetch(PDO::FETCH_ASSOC);
285
-        if( $resultSet === false )
286
-            throw new \InvalidArgumentException("Group with id = $id not found");
286
+        if( $resultSet === false ) {
287
+                    throw new \InvalidArgumentException("Group with id = $id not found");
288
+        }
287 289
 
288 290
         $ref = new \ReflectionClass(Group::class);
289 291
         $group = $this->castGroup($ref->newInstanceWithoutConstructor());
@@ -425,8 +427,9 @@  discard block
 block discarded – undo
425 427
         $this->executeOrFail($ps, [':role_id' => $id]);
426 428
 
427 429
         $resultSet = $ps->fetch(PDO::FETCH_ASSOC);
428
-        if( $resultSet === false )
429
-            throw new \InvalidArgumentException("Role with id = $id not found");
430
+        if( $resultSet === false ) {
431
+                    throw new \InvalidArgumentException("Role with id = $id not found");
432
+        }
430 433
 
431 434
         $ref = new \ReflectionClass(Role::class);
432 435
         $role = $this->castRole($ref->newInstanceWithoutConstructor());
@@ -755,8 +758,9 @@  discard block
 block discarded – undo
755 758
         ]);
756 759
 
757 760
         $resultSet = $ps->fetch(PDO::FETCH_ASSOC);
758
-        if( $resultSet === false )
759
-            throw new \InvalidArgumentException("Module with id = $id not found");
761
+        if( $resultSet === false ) {
762
+                    throw new \InvalidArgumentException("Module with id = $id not found");
763
+        }
760 764
 
761 765
         $ref = new \ReflectionClass(Module::class);
762 766
         $module = $this->castModule($ref->newInstanceWithoutConstructor());
Please login to merge, or discard this patch.
src/TAU/Common/helpers.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@
 block discarded – undo
9 9
             $app = new \League\Container\Container();
10 10
         }
11 11
 
12
-        if( $alias != null )
13
-            return $app->get($alias);
12
+        if( $alias != null ) {
13
+                    return $app->get($alias);
14
+        }
14 15
 
15 16
         return $app;
16 17
     }
Please login to merge, or discard this patch.