Code Duplication    Length = 19-19 lines in 2 locations

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

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