Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | final class AndExpr implements ExpressionInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var callable[] |
||
25 | * @psalm-var list<callable(Node): bool> |
||
26 | */ |
||
27 | private $conditions; |
||
28 | |||
29 | /** |
||
30 | * @psalm-param callable(Node): bool $expressions |
||
31 | */ |
||
32 | 33 | public function __construct(callable ...$expressions) |
|
35 | 33 | } |
|
36 | |||
37 | /** |
||
38 | * @param callable(Node): bool $expression |
||
39 | */ |
||
40 | 27 | public function add(callable $expression): void |
|
41 | { |
||
42 | 27 | $this->conditions[] = $expression; |
|
43 | 27 | } |
|
44 | |||
45 | 33 | public function __invoke(Node $node): bool |
|
54 | } |
||
55 | } |
||
56 |