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