Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 4 | public function calculateRealCost(mixed $node, mixed $adjacent): float | int |
|
28 | { |
||
29 | 4 | if (!$this->graph->hasLink($node, $adjacent)) { |
|
30 | 1 | throw new \DomainException('The provided nodes are not linked'); |
|
31 | } |
||
32 | |||
33 | 3 | return $this->graph->getLink($node, $adjacent)->getDistance(); |
|
34 | } |
||
54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.