Code Duplication    Length = 19-19 lines in 2 locations

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

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