Passed
Push — main ( 25ab27...21c65b )
by Proyecto
08:42
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/Module/Administration/Group/Domain/Group.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
     use GroupUseCases;
22 22
 
23
-     public function __construct($id, $name, $desc)
24
-     {
23
+        public function __construct($id, $name, $desc)
24
+        {
25 25
         $this->setPropertiesBag(['id', 'name', 'desc']);
26 26
         $this->setSettersBag($this->getPropertiesBag());
27 27
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->setDesc($desc);
31 31
 
32 32
         // TODO: Raise CreateGroupDomainEvent($this)
33
-     }
33
+        }
34 34
 
35 35
     public function __toString()
36 36
     {
Please login to merge, or discard this patch.
src/TAU/Module/Administration/Role/Domain/Role.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
     use RoleUseCases;
22 22
 
23
-     public function __construct($id, $name, $desc)
24
-     {
23
+        public function __construct($id, $name, $desc)
24
+        {
25 25
         $this->setPropertiesBag(['id', 'name', 'desc']);
26 26
         $this->setSettersBag($this->getPropertiesBag());
27 27
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         $this->setName($name);
30 30
         $this->setDesc($desc);
31 31
 
32
-		// TODO: Raise CreateRoleDomainEvent($this)
33
-     }
32
+        // TODO: Raise CreateRoleDomainEvent($this)
33
+        }
34 34
 
35 35
     public function __toString()
36 36
     {
Please login to merge, or discard this patch.
src/TAU/Module/Administration/Module/Domain/Module.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
     use ModuleUseCases;
22 22
 
23
-     public function __construct($id, $name, $desc)
24
-     {
23
+        public function __construct($id, $name, $desc)
24
+        {
25 25
         $this->setPropertiesBag(['id', 'name', 'desc']);
26 26
         $this->setSettersBag($this->getPropertiesBag());
27 27
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         $this->setName($name);
30 30
         $this->setDesc($desc);
31 31
 		
32
-		// TODO: Raise CreateModuleDomainEvent($this)
33
-     }
32
+        // TODO: Raise CreateModuleDomainEvent($this)
33
+        }
34 34
 
35 35
     public function __toString()
36 36
     {
Please login to merge, or discard this patch.
src/TAU/Common/PropertiesBag.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 trait PropertiesBag
6 6
 {
7 7
     private $attributes = [];
8
-	private $data = [];
8
+    private $data = [];
9 9
 
10
-	protected function setPropertiesBag($attributes)
10
+    protected function setPropertiesBag($attributes)
11 11
     {
12 12
         $this->attributes = $attributes;
13 13
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         return array_key_exists($name, $this->data);
42 42
     }
43 43
 
44
-	public function __set($name, $value)
44
+    public function __set($name, $value)
45 45
     {
46 46
         if( ! $this->isPropertyAllowed($name) ) {
47 47
             $trace = debug_backtrace();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->data[$name] = $value;
57 57
     }
58 58
 	
59
-	public function __get($name)
59
+    public function __get($name)
60 60
     {
61 61
         if( ! $this->isPropertyAllowed($name) ) {
62 62
             $trace = debug_backtrace();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         return $this->data[$name];
82 82
     }
83 83
 	
84
-	public function __isset($name)
84
+    public function __isset($name)
85 85
     {
86 86
         if( ! $this->isPropertyAllowed($name) ) {
87 87
             $trace = debug_backtrace();
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
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
             $app = new \ProyectoTAU\TAU\Common\ContainerExt();
9 9
         }
10 10
 
11
-        if( $alias != null )
12
-            return $app->get($alias);
11
+        if( $alias != null ) {
12
+                    return $app->get($alias);
13
+        }
13 14
 
14 15
         return $app;
15 16
     }
Please login to merge, or discard this patch.