Code Duplication    Length = 11-12 lines in 2 locations

Core/Matcher/ContentMatcher.php 1 location

@@ 201-212 (lines=12) @@
198
     * @param string[] $remoteParentLocationIds
199
     * @return Content[]
200
     */
201
    protected function findContentsByParentLocationRemoteIds($remoteParentLocationIds)
202
    {
203
        $locationIds = [];
204
205
        foreach ($remoteParentLocationIds as $remoteParentLocationId) {
206
            $location = $this->repository->getLocationService()->loadLocationByRemoteId($remoteParentLocationId);
207
            // unique locations
208
            $locationIds[$location->id] = $location->id;
209
        }
210
211
        return $this->findContentsByParentLocationIds($locationIds);
212
    }
213
214
    /**
215
     * @param string[] $contentTypeIdentifiers

Core/Matcher/LocationMatcher.php 1 location

@@ 179-189 (lines=11) @@
176
     * @param int[] $parentLocationRemoteIds
177
     * @return Location[]
178
     */
179
    protected function findLocationsByParentLocationRemoteIds($parentLocationRemoteIds)
180
    {
181
        $locationIds = [];
182
183
        foreach ($parentLocationRemoteIds as $parentLocationRemoteId) {
184
            $location = $this->repository->getLocationService()->loadLocationByRemoteId($parentLocationRemoteId);
185
            $locationIds[] = $location->id;
186
        }
187
188
        return $this->findLocationsByParentLocationIds($locationIds);
189
    }
190
}
191