Code Duplication    Length = 19-19 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 2 locations

@@ 2069-2087 (lines=19) @@
2066
2067
        $defaults = [null, null, null, 'eng-GB', false];
2068
        $contentIdList = [];
2069
        foreach ($contentDataList as $key => $contentData) {
2070
            $contentData = $contentData + $defaults;
2071
            list(
2072
                $fieldValue11,
2073
                $fieldValue12,
2074
                $fieldValue2,
2075
                $mainLanguageCode,
2076
                $alwaysAvailable
2077
            ) = $contentData;
2078
2079
            $contentIdList[$key] = $this->createMultilingualContent(
2080
                $contentType,
2081
                $fieldValue11,
2082
                $fieldValue12,
2083
                $fieldValue2,
2084
                $mainLanguageCode,
2085
                $alwaysAvailable
2086
            )->id;
2087
        }
2088
2089
        // "article" type Content is not matched, this ensures that non-matched
2090
        // field does not affect sort
@@ 2358-2376 (lines=19) @@
2355
2356
        $defaults = [null, null, null, 'eng-GB', false];
2357
        $contentIdList = [];
2358
        foreach ($contentDataList as $key => $contentData) {
2359
            $contentData = $contentData + $defaults;
2360
            list(
2361
                $fieldValue11,
2362
                $fieldValue12,
2363
                $fieldValue2,
2364
                $mainLanguageCode,
2365
                $alwaysAvailable
2366
            ) = $contentData;
2367
2368
            $contentIdList[$key] = $this->createMultilingualContent(
2369
                $contentType,
2370
                $fieldValue11,
2371
                $fieldValue12,
2372
                $fieldValue2,
2373
                $mainLanguageCode,
2374
                $alwaysAvailable
2375
            )->id;
2376
        }
2377
2378
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2379
        $searchService = $repository->getSearchService();