| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class StrictElementMatcher implements SortedChildMatcherInterface |
||
| 14 | { |
||
| 15 | |||
| 16 | private $indexes; |
||
| 17 | |||
| 18 | 3 | public function __construct(int ...$indexes) |
|
| 21 | 3 | } |
|
| 22 | |||
| 23 | 3 | public function match($address, NodeValueInterface $value, NodeValueInterface $container): bool |
|
| 24 | { |
||
| 25 | 3 | return in_array($address, $this->indexes, true); |
|
| 26 | } |
||
| 27 | |||
| 28 | public function getSortIndex($address, NodeValueInterface $value, NodeValueInterface $container): int |
||
| 37 | } |
||
| 38 | } |
||
| 39 |