Code Duplication    Length = 19-19 lines in 2 locations

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

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