@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | if (!is_null($relation)) { |
| 95 | 95 | $point = $relation->to |
| 96 | - ->id; |
|
| 96 | + ->id; |
|
| 97 | 97 | } else { |
| 98 | 98 | $point = $paths[$point]->nodes[0]; |
| 99 | 99 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | if (isset($paths[$relation->to->id])) { |
| 144 | 144 | if ($paths[$relation->to->id]->distance > ($paths[$point]->distance + $relation->distance)) { |
| 145 | 145 | $paths[$relation->to->id]->copy($paths[$point]) |
| 146 | - ->addNode($relation->to->id, $relation->distance); |
|
| 146 | + ->addNode($relation->to->id, $relation->distance); |
|
| 147 | 147 | } |
| 148 | 148 | } else { |
| 149 | 149 | $paths[$relation->to->id] = (new Path())->copy($paths[$point]) |
@@ -81,6 +81,9 @@ |
||
| 81 | 81 | return false; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | + /** |
|
| 85 | + * @param integer $startPoint |
|
| 86 | + */ |
|
| 84 | 87 | private function findPointWithUncheckedRelation($unvisited, $visited, $startPoint = null) |
| 85 | 88 | { |
| 86 | 89 | if (empty($unvisited)) { |