Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 1943-1961 (lines=19) @@
1940
1941
        $defaults = array(null, null, null, 'eng-GB', false);
1942
        $contentIdList = array();
1943
        foreach ($contentDataList as $key => $contentData) {
1944
            $contentData = $contentData + $defaults;
1945
            list(
1946
                $fieldValue11,
1947
                $fieldValue12,
1948
                $fieldValue2,
1949
                $mainLanguageCode,
1950
                $alwaysAvailable
1951
            ) = $contentData;
1952
1953
            $contentIdList[$key] = $this->createMultilingualContent(
1954
                $contentType,
1955
                $fieldValue11,
1956
                $fieldValue12,
1957
                $fieldValue2,
1958
                $mainLanguageCode,
1959
                $alwaysAvailable
1960
            )->id;
1961
        }
1962
1963
        // "article" type Content is not matched, this ensures that non-matched
1964
        // field does not affect sort
@@ 2232-2250 (lines=19) @@
2229
2230
        $defaults = array(null, null, null, 'eng-GB', false);
2231
        $contentIdList = array();
2232
        foreach ($contentDataList as $key => $contentData) {
2233
            $contentData = $contentData + $defaults;
2234
            list(
2235
                $fieldValue11,
2236
                $fieldValue12,
2237
                $fieldValue2,
2238
                $mainLanguageCode,
2239
                $alwaysAvailable
2240
            ) = $contentData;
2241
2242
            $contentIdList[$key] = $this->createMultilingualContent(
2243
                $contentType,
2244
                $fieldValue11,
2245
                $fieldValue12,
2246
                $fieldValue2,
2247
                $mainLanguageCode,
2248
                $alwaysAvailable
2249
            )->id;
2250
        }
2251
2252
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2253
        $searchService = $repository->getSearchService();