Code Duplication    Length = 5-7 lines in 2 locations

src/JsonRepository.php 2 locations

@@ 137-143 (lines=7) @@
134
135
        if (count($parentReferences) > 0) {
136
            foreach ($parentReferences as $currentPath => $currentReferences) {
137
                if (isset($this->json['_order'][$currentPath])) {
138
                    $this->json['_order'][$path] = $this->json['_order'][$currentPath];
139
140
                    $this->insertOrderEntry($path, $path);
141
142
                    break;
143
                }
144
            }
145
        }
146
@@ 168-172 (lines=5) @@
165
                // after adding /a/b and /a. Here, /a/b has the order
166
                // [/a, /a/b] defined. The long path should end up with
167
                // the order [/a/b, /a, /a/b].
168
                if (isset($this->json['_order'][$parentPath])) {
169
                    $this->json['_order'][$currentPath] = $this->json['_order'][$parentPath];
170
171
                    break;
172
                }
173
174
                // Otherwise continue to build the default order
175
                $parentEntry = array(