| Total Complexity | 5 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class Euclidean implements Metric |
||
| 10 | { |
||
| 11 | private $dimensions; |
||
| 12 | |||
| 13 | public function __construct(int $dimensions) |
||
| 14 | { |
||
| 15 | $this->dimensions = $dimensions; |
||
| 16 | } |
||
| 17 | |||
| 18 | public static function distance(): Metric |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function inDimensions(int $amount): Metric |
||
| 24 | { |
||
| 25 | return new self($amount); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function distanceBetween(Position $start, Position $goal): float |
||
| 35 | } |
||
| 36 | } |
||
| 37 |