Code Duplication    Length = 19-19 lines in 2 locations

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

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