Passed
Push — master ( 4e36c0...26f6ea )
by David
01:34
created
src/Parser/MatrixParser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@
 block discarded – undo
45 45
      */
46 46
     public function parse()
47 47
     {
48
-        foreach($this->originalMatrix as $rKey => $row) {
49
-            foreach($row as $cKey => $column) {
48
+        foreach ($this->originalMatrix as $rKey => $row) {
49
+            foreach ($row as $cKey => $column) {
50 50
                 $placeType = $this->placeCollector->getPlaceTypeByWeight($column['weight']);
51 51
                 $placeTypeNew = new Place($placeType);
52 52
 
53
-                $placeTypeNew->setName($rKey . $cKey);
54
-                if( isset($this->originalMatrix[$rKey - 1][$cKey]['obj']) ) {
53
+                $placeTypeNew->setName($rKey.$cKey);
54
+                if (isset($this->originalMatrix[$rKey - 1][$cKey]['obj'])) {
55 55
                     $placeTypeNew->setTopRef($this->originalMatrix[$rKey - 1][$cKey]['obj']);
56 56
                 }
57 57
 
58
-                if( isset($this->originalMatrix[$rKey][$cKey - 1]['obj']) ) {
58
+                if (isset($this->originalMatrix[$rKey][$cKey - 1]['obj'])) {
59 59
                     $placeTypeNew->setLeftRef($this->originalMatrix[$rKey][$cKey - 1]['obj']);
60 60
                 }
61 61
 
Please login to merge, or discard this patch.
src/Warehouse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function createFromJson($path)
53 53
     {
54
-        if( !$path )
54
+        if (!$path)
55 55
             throw new \Exception('Please select a path');
56 56
 
57 57
         $placesCollector = new PlacesCollector();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public static function createFromMatrix($param)
76 76
     {
77
-        if( !is_array($param) )
77
+        if (!is_array($param))
78 78
             throw new \Exception('Matrix should be initialized with an array');
79 79
 
80 80
         $placesCollector = new PlacesCollector();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public static function createFromTree($param)
99 99
     {
100
-        if( !is_array($param) )
100
+        if (!is_array($param))
101 101
             throw new \Exception('Should be initialized with an array');
102 102
 
103 103
         $placesCollector = new PlacesCollector();
@@ -178,17 +178,17 @@  discard block
 block discarded – undo
178 178
         /** @var Place[][] $resultMatrix */
179 179
         $resultMatrix = array();
180 180
 
181
-        if ( empty($places) )
181
+        if (empty($places))
182 182
             throw new \Exception('First add the places');
183 183
 
184 184
         /** @var Place $startingPlace */
185 185
         $startingPlace = reset($places);
186 186
 
187
-        while ( $newPlace = $startingPlace->getTopRef() ) {
187
+        while ($newPlace = $startingPlace->getTopRef()) {
188 188
             $startingPlace = $newPlace;
189 189
         }
190 190
 
191
-        while ( $newPlace = $startingPlace->getLeftRef() ) {
191
+        while ($newPlace = $startingPlace->getLeftRef()) {
192 192
             $startingPlace = $newPlace;
193 193
         }
194 194
 
Please login to merge, or discard this patch.