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

@@ 98-104 (lines=7) @@
95
                $currentDir = dirname($path);
96
97
                $parents = [];
98
                if (!empty($parent)) {
99
                    if (!isset($this->collectionParents[$parent])) {
100
                        throw new \InvalidArgumentException(sprintf('Cannot find parent resource with name %s', $parent));
101
                    }
102
103
                    $parents = $this->collectionParents[$parent];
104
                }
105
106
                $imported = $this->processor->importResource($this, $resource, $parents, $prefix, $namePrefix, $type, $currentDir);
107