Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class AnyOf implements FqcnSpecification, Chainable |
||
13 | { |
||
14 | /** |
||
15 | * @var FqcnSpecification[] |
||
16 | */ |
||
17 | protected $specifications; |
||
18 | |||
19 | public function __construct(FqcnSpecification $specification, FqcnSpecification ...$specifications) |
||
23 | } |
||
24 | |||
25 | public function isSatisfiedBy(string $fqcn): bool |
||
26 | { |
||
27 | foreach ($this->specifications as $fqcnSpecification) { |
||
28 | if ($fqcnSpecification->isSatisfiedBy($fqcn)) { |
||
29 | return true; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | return false; |
||
34 | } |
||
35 | |||
36 | public function append(FqcnSpecification $specification) |
||
39 | } |
||
40 | } |
||
41 |