Code Duplication    Length = 7-7 lines in 2 locations

Routing/Loader/RestXmlCollectionLoader.php 1 location

@@ 77-83 (lines=7) @@
74
                $currentDir = dirname($path);
75
76
                $parents = [];
77
                if (!empty($parent)) {
78
                    if (!isset($this->collectionParents[$parent])) {
79
                        throw new \InvalidArgumentException(sprintf('Cannot find parent resource with name %s', $parent));
80
                    }
81
82
                    $parents = $this->collectionParents[$parent];
83
                }
84
85
                $imported = $this->processor->importResource($this, $resource, $parents, $prefix, $namePrefix, $type, $currentDir);
86

Routing/Loader/RestYamlCollectionLoader.php 1 location

@@ 83-89 (lines=7) @@
80
                $currentDir = dirname($path);
81
82
                $parents = [];
83
                if (!empty($parent)) {
84
                    if (!isset($this->collectionParents[$parent])) {
85
                        throw new \InvalidArgumentException(sprintf('Cannot find parent resource with name %s', $parent));
86
                    }
87
88
                    $parents = $this->collectionParents[$parent];
89
                }
90
91
                $imported = $this->processor->importResource($this, $resource, $parents, $prefix, $namePrefix, $type, $currentDir);
92