Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
8 | final class FromPreviousEnvironment implements Heuristic |
||
9 | { |
||
10 | private $heuristic; |
||
11 | private $environment; |
||
12 | |||
13 | private function __construct(Heuristic $heuristic, Environment $environment) |
||
17 | } |
||
18 | |||
19 | public static function state( |
||
20 | Heuristic $heuristic, |
||
21 | Environment $environment |
||
22 | ): Heuristic { |
||
23 | return new self($heuristic, $environment); |
||
24 | } |
||
25 | |||
26 | public function estimate(string $start, string $goal): float |
||
27 | { |
||
28 | return $this->heuristic->estimate($start, $goal); |
||
29 | } |
||
30 | |||
31 | public function environment(): Environment |
||
34 | } |
||
35 | } |
||
36 |