Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
14 | final class IdsQuery implements QueryInterface |
||
15 | { |
||
16 | private array $query; |
||
17 | |||
18 | /** @param array $ids */ |
||
19 | public static function fromNative($ids): QueryInterface |
||
20 | { |
||
21 | Assert::that($ids)->isArray('Must be an array.')->notEmpty('Must not be empty.'); |
||
22 | return new self($ids); |
||
23 | } |
||
24 | |||
25 | public function toNative(): array |
||
26 | { |
||
27 | return $this->query; |
||
28 | } |
||
29 | |||
30 | private function __construct(array $ids) |
||
36 | ] |
||
37 | ] |
||
38 | ]; |
||
41 |