Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | protected function getWrappedPath(string $statement, string $quote = "'"): array |
||
36 | { |
||
37 | $path = \explode('->', $statement); |
||
38 | \array_shift($path); // remove field name (first element) |
||
39 | |||
40 | $result = []; |
||
41 | foreach ($path as $pathAttribute) { |
||
42 | $parsedAttributes = $this->parseJsonPathArrayKeys($pathAttribute); |
||
43 | foreach ($parsedAttributes as $attribute) { |
||
44 | $result[] = \filter_var($attribute, FILTER_VALIDATE_INT) !== false |
||
45 | ? $attribute |
||
46 | : $quote . $attribute . $quote; |
||
47 | } |
||
48 | } |
||
49 | |||
50 | return $result; |
||
51 | } |
||
53 |