| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 18 | final class WorseThanBestSolutionSkipper implements SearchStrategy |
||
| 19 | { |
||
| 20 | /** @var float */ |
||
| 21 | private $lowestSolutionCost = INF; |
||
| 22 | /** @var SearchStrategy */ |
||
| 23 | private $search; |
||
| 24 | |||
| 25 | private function __construct(SearchStrategy $search) |
||
| 26 | { |
||
| 27 | $this->search = $search; |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function forThe(SearchStrategy $search): self |
||
| 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 |
||
| 58 | } |
||
| 59 | } |
||
| 60 |