Code Duplication    Length = 12-12 lines in 2 locations

Core/Matcher/ContentMatcher.php 2 locations

@@ 154-165 (lines=12) @@
151
     * @param int[] $locationIds
152
     * @return Content[]
153
     */
154
    protected function findContentsByLocationIds(array $locationIds)
155
    {
156
        $contentIds = [];
157
158
        foreach ($locationIds as $locationId) {
159
            $location = $this->repository->getLocationService()->loadLocation($locationId);
160
            // return unique ids
161
            $contentIds[$location->contentId] = $location->contentId;
162
        }
163
164
        return $this->findContentsByContentIds($contentIds);
165
    }
166
167
    /**
168
     * @param string[] $remoteLocationIds
@@ 171-182 (lines=12) @@
168
     * @param string[] $remoteLocationIds
169
     * @return Content[]
170
     */
171
    protected function findContentsByLocationRemoteIds($remoteLocationIds)
172
    {
173
        $contentIds = [];
174
175
        foreach ($remoteLocationIds as $remoteLocationId) {
176
            $location = $this->repository->getLocationService()->loadLocationByRemoteId($remoteLocationId);
177
            // return unique ids
178
            $contentIds[$location->contentId] = $location->contentId;
179
        }
180
181
        return $this->findContentsByContentIds($contentIds);
182
    }
183
184
    /**
185
     * @param int[] $parentLocationIds