Code Duplication    Length = 12-12 lines in 2 locations

Core/Matcher/ContentMatcher.php 2 locations

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