Code Duplication    Length = 15-16 lines in 2 locations

Core/Matcher/ContentMatcher.php 1 location

@@ 169-183 (lines=15) @@
166
     * @return Content[]
167
     * @deprecated
168
     */
169
    protected function findContentsByParentLocationIds($parentLocationIds)
170
    {
171
        $query = new Query();
172
        $query->limit = PHP_INT_MAX;
173
        $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds);
174
        $results = $this->repository->getSearchService()->findContent($query);
175
176
        $contents = [];
177
        foreach ($results->searchHits as $result) {
178
            // make sure we return every object only once
179
            $contents[$result->valueObject->contentInfo->id] = $result->valueObject;
180
        }
181
182
        return $contents;
183
    }
184
185
    /**
186
     * @param string[] $remoteParentLocationIds

Core/Matcher/LocationMatcher.php 1 location

@@ 194-209 (lines=16) @@
191
     * @return Location[]
192
     * @deprecated
193
     */
194
    protected function findLocationsByParentLocationIds($parentLocationIds)
195
    {
196
        $query = new LocationQuery();
197
        $query->limit = PHP_INT_MAX;
198
        $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds);
199
200
        $results = $this->repository->getSearchService()->findLocations($query);
201
202
        $locations = [];
203
204
        foreach ($results->searchHits as $result) {
205
            $locations[$result->valueObject->id] = $result->valueObject;
206
        }
207
208
        return $locations;
209
    }
210
211
    /**
212
     * @param int[] $parentLocationRemoteIds