Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class Query implements QueryInterface |
||
12 | { |
||
13 | |||
14 | private $source; |
||
15 | |||
16 | private $callback; |
||
17 | |||
18 | private $properties; |
||
19 | |||
20 | public function __construct(string $source, callable $callback, QueryCapabilitiesInterface $properties) |
||
21 | { |
||
22 | $this->source = $source; |
||
23 | $this->callback = $callback; |
||
24 | $this->properties = $properties; |
||
25 | } |
||
26 | |||
27 | public function __invoke(RuntimeInterface $runtime, NodeValueInterface $rootNode): ValueListInterface |
||
28 | { |
||
29 | return call_user_func($this->callback, $runtime, $rootNode); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return QueryCapabilitiesInterface |
||
34 | * @deprecated |
||
35 | */ |
||
36 | public function getProperties(): QueryCapabilitiesInterface |
||
39 | } |
||
40 | |||
41 | public function getCapabilities(): QueryCapabilitiesInterface |
||
42 | { |
||
43 | return $this->properties; |
||
44 | } |
||
45 | |||
46 | public function getSource(): string |
||
49 | } |
||
50 | } |
||
51 |