Conditions | 5 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 1 | public function applyToNode(Node $node) |
|
24 | { |
||
25 | 1 | $instruction = $node->getInstruction($this); |
|
26 | 1 | ||
27 | if (is_array($instruction) || is_object($instruction)) { |
||
28 | 1 | $instruction = (object)$instruction; |
|
29 | 1 | } |
|
30 | |||
31 | 1 | $input = is_string($instruction) ? $node->getResult() : $instruction->input; |
|
32 | 1 | $query = is_string($instruction) ? $instruction : $instruction->query; |
|
33 | |||
34 | $result = jmespath_search($query, $input); |
||
35 | static::objectivy($result); |
||
36 | |||
37 | $node->setResult($result); |
||
38 | } |
||
39 | 1 | ||
58 |