Code Duplication    Length = 9-9 lines in 2 locations

src/Extractors/PlainExtractors/AssocExtractor.php 2 locations

@@ 88-96 (lines=9) @@
85
        for ($i = 0; $i < $length; $i++) {
86
            $item = $value->get($context, new IntegerValue($isolate, $i));
87
88
            if ($next) {
89
                try {
90
                    $out[] = $extractor->extract($context, $item, $next);
91
                } catch (ExtractorException $e) {
92
                    throw new ExtractorException("Failed to convert array item #{$i}: " . $e->getMessage());
93
                }
94
            } else {
95
                $out[] = $item;
96
            }
97
        }
98
99
        return $out;
@@ 129-137 (lines=9) @@
126
127
            $prop_name = $prop->value();
128
129
            if ($next) {
130
                try {
131
                    $out[$prop_name] = $extractor->extract($context, $item, $next);
132
                } catch (ExtractorException $e) {
133
                    throw new ExtractorException("Failed to convert array item #{$prop_name}: " . $e->getMessage());
134
                }
135
            } else {
136
                $out[$prop_name] = $item;
137
            }
138
        }
139
140
        return $out;