Total Complexity | 7 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
18 | final class VisitedNodeSkipper implements SearchStrategy |
||
19 | { |
||
20 | /** @var SearchStrategy */ |
||
21 | private $search; |
||
22 | /** @var bool[] */ |
||
23 | private $visited = []; |
||
24 | |||
25 | public function __construct(SearchStrategy $search) |
||
28 | } |
||
29 | |||
30 | public static function forThe(SearchStrategy $search): SearchStrategy |
||
31 | { |
||
32 | return new self($search); |
||
33 | } |
||
34 | |||
35 | public function isOngoing(): bool |
||
36 | { |
||
37 | return $this->search->isOngoing(); |
||
38 | } |
||
39 | |||
40 | public function consider(Puzzle $puzzle): bool |
||
46 | } |
||
47 | |||
48 | public function nextCandidate(): Puzzle |
||
55 | } |
||
56 | } |
||
57 |