Passed
Push — master ( 4e36c0...26f6ea )
by David
01:34
created
src/Warehouse.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function createFromJson($path)
53 53
     {
54
-        if( !$path )
55
-            throw new \Exception('Please select a path');
54
+        if( !$path ) {
55
+                    throw new \Exception('Please select a path');
56
+        }
56 57
 
57 58
         $placesCollector = new PlacesCollector();
58 59
         $placesCollector->addBasePlaceTypes();
@@ -74,8 +75,9 @@  discard block
 block discarded – undo
74 75
      */
75 76
     public static function createFromMatrix($param)
76 77
     {
77
-        if( !is_array($param) )
78
-            throw new \Exception('Matrix should be initialized with an array');
78
+        if( !is_array($param) ) {
79
+                    throw new \Exception('Matrix should be initialized with an array');
80
+        }
79 81
 
80 82
         $placesCollector = new PlacesCollector();
81 83
         $placesCollector->addBasePlaceTypes();
@@ -97,8 +99,9 @@  discard block
 block discarded – undo
97 99
      */
98 100
     public static function createFromTree($param)
99 101
     {
100
-        if( !is_array($param) )
101
-            throw new \Exception('Should be initialized with an array');
102
+        if( !is_array($param) ) {
103
+                    throw new \Exception('Should be initialized with an array');
104
+        }
102 105
 
103 106
         $placesCollector = new PlacesCollector();
104 107
         $placesCollector->addBasePlaceTypes();
@@ -178,8 +181,9 @@  discard block
 block discarded – undo
178 181
         /** @var Place[][] $resultMatrix */
179 182
         $resultMatrix = array();
180 183
 
181
-        if ( empty($places) )
182
-            throw new \Exception('First add the places');
184
+        if ( empty($places) ) {
185
+                    throw new \Exception('First add the places');
186
+        }
183 187
 
184 188
         /** @var Place $startingPlace */
185 189
         $startingPlace = reset($places);
Please login to merge, or discard this patch.