Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 2209-2227 (lines=19) @@
2206
2207
        $defaults = [null, null, null, 'eng-GB', false];
2208
        $contentIdList = [];
2209
        foreach ($contentDataList as $key => $contentData) {
2210
            $contentData = $contentData + $defaults;
2211
            list(
2212
                $fieldValue11,
2213
                $fieldValue12,
2214
                $fieldValue2,
2215
                $mainLanguageCode,
2216
                $alwaysAvailable
2217
            ) = $contentData;
2218
2219
            $contentIdList[$key] = $this->createMultilingualContent(
2220
                $contentType,
2221
                $fieldValue11,
2222
                $fieldValue12,
2223
                $fieldValue2,
2224
                $mainLanguageCode,
2225
                $alwaysAvailable
2226
            )->id;
2227
        }
2228
2229
        // "article" type Content is not matched, this ensures that non-matched
2230
        // field does not affect sort
@@ 2498-2516 (lines=19) @@
2495
2496
        $defaults = [null, null, null, 'eng-GB', false];
2497
        $contentIdList = [];
2498
        foreach ($contentDataList as $key => $contentData) {
2499
            $contentData = $contentData + $defaults;
2500
            list(
2501
                $fieldValue11,
2502
                $fieldValue12,
2503
                $fieldValue2,
2504
                $mainLanguageCode,
2505
                $alwaysAvailable
2506
            ) = $contentData;
2507
2508
            $contentIdList[$key] = $this->createMultilingualContent(
2509
                $contentType,
2510
                $fieldValue11,
2511
                $fieldValue12,
2512
                $fieldValue2,
2513
                $mainLanguageCode,
2514
                $alwaysAvailable
2515
            )->id;
2516
        }
2517
2518
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2519
        $searchService = $repository->getSearchService();