Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 2055-2073 (lines=19) @@
2052
2053
        $defaults = array(null, null, null, 'eng-GB', false);
2054
        $contentIdList = array();
2055
        foreach ($contentDataList as $key => $contentData) {
2056
            $contentData = $contentData + $defaults;
2057
            list(
2058
                $fieldValue11,
2059
                $fieldValue12,
2060
                $fieldValue2,
2061
                $mainLanguageCode,
2062
                $alwaysAvailable
2063
            ) = $contentData;
2064
2065
            $contentIdList[$key] = $this->createMultilingualContent(
2066
                $contentType,
2067
                $fieldValue11,
2068
                $fieldValue12,
2069
                $fieldValue2,
2070
                $mainLanguageCode,
2071
                $alwaysAvailable
2072
            )->id;
2073
        }
2074
2075
        // "article" type Content is not matched, this ensures that non-matched
2076
        // field does not affect sort
@@ 2344-2362 (lines=19) @@
2341
2342
        $defaults = array(null, null, null, 'eng-GB', false);
2343
        $contentIdList = array();
2344
        foreach ($contentDataList as $key => $contentData) {
2345
            $contentData = $contentData + $defaults;
2346
            list(
2347
                $fieldValue11,
2348
                $fieldValue12,
2349
                $fieldValue2,
2350
                $mainLanguageCode,
2351
                $alwaysAvailable
2352
            ) = $contentData;
2353
2354
            $contentIdList[$key] = $this->createMultilingualContent(
2355
                $contentType,
2356
                $fieldValue11,
2357
                $fieldValue12,
2358
                $fieldValue2,
2359
                $mainLanguageCode,
2360
                $alwaysAvailable
2361
            )->id;
2362
        }
2363
2364
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2365
        $searchService = $repository->getSearchService();