Code Duplication    Length = 12-12 lines in 2 locations

Core/Matcher/ContentMatcher.php 2 locations

@@ 132-143 (lines=12) @@
129
     * @param int[] $locationIds
130
     * @return Content[]
131
     */
132
    protected function findContentsByLocationIds(array $locationIds)
133
    {
134
        $contentIds = [];
135
136
        foreach ($locationIds as $locationId) {
137
            $location = $this->repository->getLocationService()->loadLocation($locationId);
138
            // return unique ids
139
            $contentIds[$location->contentId] = $location->contentId;
140
        }
141
142
        return $this->findContentsByContentIds($contentIds);
143
    }
144
145
    /**
146
     * @param string[] $remoteLocationIds
@@ 149-160 (lines=12) @@
146
     * @param string[] $remoteLocationIds
147
     * @return Content[]
148
     */
149
    protected function findContentsByLocationRemoteIds($remoteLocationIds)
150
    {
151
        $contentIds = [];
152
153
        foreach ($remoteLocationIds as $remoteLocationId) {
154
            $location = $this->repository->getLocationService()->loadLocationByRemoteId($remoteLocationId);
155
            // return unique ids
156
            $contentIds[$location->contentId] = $location->contentId;
157
        }
158
159
        return $this->findContentsByContentIds($contentIds);
160
    }
161
162
    /**
163
     * @param int[] $parentLocationIds