Passed
Push — master ( ecaac2...a03751 )
by David
01:36
created
src/Tools/Console/Command/GraphicalTestCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected function execute(InputInterface $input, OutputInterface $output)
32 32
     {
33
-        $warehouse = Warehouse::createFromJson(getcwd() . "/resources/biggerWarehouse.json");
33
+        $warehouse = Warehouse::createFromJson(getcwd()."/resources/biggerWarehouse.json");
34 34
 
35 35
         /** @var Place $nodeStart */
36 36
         $nodeStart = $warehouse->getPlacesCollector()->getPlaces()[5];
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $table->setRows($calculatedMatrix);
46 46
         $table->render();
47 47
 
48
-        $output->writeln("Start: " . $nodeStart->getName());
49
-        $output->writeln("End: " . $nodeEnd->getName());
50
-        $output->writeln("Total path: " . $nodeEnd->getCurrentWeight());
48
+        $output->writeln("Start: ".$nodeStart->getName());
49
+        $output->writeln("End: ".$nodeEnd->getName());
50
+        $output->writeln("Total path: ".$nodeEnd->getCurrentWeight());
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
src/Tools/Console/Command/ShortestPathGraphicalTestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34 34
         /** @var Warehouse $warehouse */
35
-        $warehouse = Warehouse::createFromJson(getcwd() . "/../resources/biggerWarehouse.json");
35
+        $warehouse = Warehouse::createFromJson(getcwd()."/../resources/biggerWarehouse.json");
36 36
         $calculatedArray = $warehouse->getPlacesCollector()->getPlaces();
37 37
 
38 38
         $warehouse->setPathCalculator(new ShortPathCalculator());
Please login to merge, or discard this patch.
src/Tools/Console/Command/PrintMatrixTestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     protected function execute(InputInterface $input, OutputInterface $output)
32 32
     {
33 33
         /** @var Warehouse $warehouse */
34
-        $warehouse = Warehouse::createFromJson(getcwd() . "/./resources/simpleWarehouse.json");
34
+        $warehouse = Warehouse::createFromJson(getcwd()."/./resources/simpleWarehouse.json");
35 35
 
36 36
         $this->printTable($output, array(), $warehouse->createMatrix());
37 37
     }
Please login to merge, or discard this patch.
src/Tools/Console/Command/MultiplePathGraphicalTestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34 34
         /** @var Warehouse $warehouse */
35
-        $warehouse = Warehouse::createFromJson(getcwd() . "/../resources/biggerWarehouse.json");
35
+        $warehouse = Warehouse::createFromJson(getcwd()."/../resources/biggerWarehouse.json");
36 36
         $calculatedArray = $warehouse->getPlacesCollector()->getPlaces();
37 37
 
38 38
         $warehouse->setPathCalculator(new FastCalculator());
Please login to merge, or discard this patch.
src/Breadcrumb/FastBreadthFirstBreadcrumb.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function createBreadcrumb(Place $startPlace, Place $endPlace = null)
64 64
     {
65
-        if ( is_callable( $this->onPreCreateBreadcumb ) ) {
65
+        if (is_callable($this->onPreCreateBreadcumb)) {
66 66
             call_user_func($this->onPreCreateBreadcumb, $startPlace, $this->placeCollector->getPlacesType());
67 67
         }
68 68
 
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
             /** @var Place $current */
74 74
             $current = array_shift($frontier);
75 75
 
76
-            if( $current->getCurrentWeight() > $this->precision )
76
+            if ($current->getCurrentWeight() > $this->precision)
77 77
                 continue;
78 78
 
79
-            if ( is_callable( $this->onWalk ) ) {
79
+            if (is_callable($this->onWalk)) {
80 80
                 call_user_func($this->onWalk, $current);
81 81
             }
82 82
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,9 @@
 block discarded – undo
73 73
             /** @var Place $current */
74 74
             $current = array_shift($frontier);
75 75
 
76
-            if( $current->getCurrentWeight() > $this->precision )
77
-                continue;
76
+            if( $current->getCurrentWeight() > $this->precision ) {
77
+                            continue;
78
+            }
78 79
 
79 80
             if ( is_callable( $this->onWalk ) ) {
80 81
                 call_user_func($this->onWalk, $current);
Please login to merge, or discard this patch.
tests/WarehouseTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function testTransformToTreeConstructor(): void
17 17
     {
18 18
         /** @var Warehouse $testMatrix */
19
-        $testMatrix = Warehouse::createFromJson(getcwd() . "/resources/simpleWarehouse.json");
19
+        $testMatrix = Warehouse::createFromJson(getcwd()."/resources/simpleWarehouse.json");
20 20
 
21 21
         $calculatedArray = $testMatrix->getPlacesCollector()->getPlaces();
22 22
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function testBigConstructor(): void
37 37
     {
38 38
         /** @var Warehouse $testMatrix */
39
-        $testMatrix = Warehouse::createFromJson(getcwd() . "/resources/biggerWarehouse.json");
39
+        $testMatrix = Warehouse::createFromJson(getcwd()."/resources/biggerWarehouse.json");
40 40
 
41 41
         $calculatedArray = $testMatrix->getPlacesCollector()->getPlaces();
42 42
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function testBigMultiplePath(): void
57 57
     {
58 58
         /** @var Warehouse $testMatrix */
59
-        $testMatrix = Warehouse::createFromJson(getcwd() . "/resources/biggerWarehouse.json");
59
+        $testMatrix = Warehouse::createFromJson(getcwd()."/resources/biggerWarehouse.json");
60 60
 
61 61
         $calculatedArray = $testMatrix->getPlacesCollector()->getPlaces();
62 62
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function testBigFastMultiplePath(): void
96 96
     {
97
-        $path = getcwd() . "/resources/biggerWarehouse.json";
97
+        $path = getcwd()."/resources/biggerWarehouse.json";
98 98
         $placesCollector = new PlacesCollector();
99 99
         $placesCollector->addBasePlaceTypes();
100 100
 
Please login to merge, or discard this patch.