Code Duplication    Length = 11-11 lines in 2 locations

src/Core/Variables/VariableExtractor.php 1 location

@@ 120-130 (lines=11) @@
117
     * @param string $propertyPath
118
     * @return string
119
     */
120
    protected function resolveSubVariableReferences($subject, $propertyPath)
121
    {
122
        if (strpos($propertyPath, '{') !== false) {
123
            preg_match_all('/(\{.*\})/', $propertyPath, $matches);
124
            foreach ($matches[1] as $match) {
125
                $subPropertyPath = substr($match, 1, -1);
126
                $propertyPath = str_replace($match, $this->getByPath($subject, $subPropertyPath), $propertyPath);
127
            }
128
        }
129
        return $propertyPath;
130
    }
131
132
    /**
133
     * Extracts a single value from an array or object.

src/Core/Variables/StandardVariableProvider.php 1 location

@@ 319-329 (lines=11) @@
316
     * @param string $propertyPath
317
     * @return string
318
     */
319
    protected function resolveSubVariableReferences($propertyPath)
320
    {
321
        if (strpos($propertyPath, '{') !== false) {
322
            preg_match_all('/(\{.*\})/', $propertyPath, $matches);
323
            foreach ($matches[1] as $match) {
324
                $subPropertyPath = substr($match, 1, -1);
325
                $propertyPath = str_replace($match, $this->getByPath($subPropertyPath), $propertyPath);
326
            }
327
        }
328
        return $propertyPath;
329
    }
330
331
    /**
332
     * Extracts a single value from an array or object.