Completed
Push — master ( 195fbe...724c19 )
by Ventaquil
02:47
created
src/Dijkstra/Path.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@
 block discarded – undo
32 32
         return $this;
33 33
     }
34 34
 
35
+    /**
36
+     * @param integer $distance
37
+     */
35 38
     public function checkDistance($distance)
36 39
     {
37 40
         if (!is_numeric($distance) && ($distance <= 0)) {
Please login to merge, or discard this patch.
src/Dijkstra.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
             if (!is_null($relation)) {
84 84
                 $point = $relation->to
85
-                                  ->id;
85
+                                    ->id;
86 86
             } else {
87 87
                 $point = null;
88 88
             }
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
             if (isset($paths[$relation->to->id])) {
129 129
                 if ($paths[$relation->to->id]->distance > ($paths[$point]->distance + $relation->distance)) {
130 130
                     $paths[$relation->to->id]->copy($paths[$point])
131
-                                             ->addNode($relation->to->id, $relation->distance);
131
+                                                ->addNode($relation->to->id, $relation->distance);
132 132
                 }
133 133
             } else {
134 134
                 $paths[$relation->to->id] = new Path();
135 135
                 $paths[$relation->to->id]->copy($paths[$point])
136
-                                         ->addNode($relation->to->id, $relation->distance);
136
+                                            ->addNode($relation->to->id, $relation->distance);
137 137
             }
138 138
         }
139 139
     }
Please login to merge, or discard this patch.