| 1 | <?php |
||
| 13 | class ListExactly extends Set |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var int Target count |
||
| 17 | */ |
||
| 18 | private $count; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Set target count |
||
| 22 | * |
||
| 23 | * @param int $count |
||
| 24 | * @param ExpressionInterface $expr |
||
| 25 | */ |
||
| 26 | public function __construct(int $count, ExpressionInterface $expr) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Expression must evaluate to true for exact numer of items in list |
||
| 34 | */ |
||
| 35 | public function evaluate($list): bool |
||
| 51 | } |
||
| 52 |