| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 3 | public function printSequence(): void |
|
| 16 | { |
||
| 17 | 3 | $coordinatesAsString = []; |
|
| 18 | |||
| 19 | 3 | foreach ($this->sequence as $coordinate) { |
|
| 20 | 2 | $coordinatesAsString[] = $this->getCoordinateAsString($coordinate); |
|
| 21 | } |
||
| 22 | |||
| 23 | 3 | if (!empty($coordinatesAsString)) { |
|
| 24 | 2 | echo implode(' => ', $coordinatesAsString); |
|
| 25 | 2 | echo "\n"; |
|
| 26 | } |
||
| 27 | |||
| 28 | 3 | echo 'Total cost: ' . $this->getTotalDistance(); |
|
| 29 | 3 | } |
|
| 56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.