* If an absolute path precedes the array fields, extract the sub-array. */
($json, string $path)
| 205 | * If an absolute path precedes the array fields, extract the sub-array. |
| 206 | */ |
| 207 | private function extractAbsolutePathIfPresent($json, string $path) { |
| 208 | $firstBracePos = strpos($path, '{'); |
| 209 | if ($firstBracePos !== false && $firstBracePos > 0) { |
| 210 | $absolutePath = substr($path, 0, $firstBracePos); |
| 211 | return $this->get_nested_array_value($json, $absolutePath); |
| 212 | } |
| 213 | return $json; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * Ensures the paths array has at least $minCount elements, padding with $fill if needed. |
no test coverage detected