Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 2243-2261 (lines=19) @@
2240
2241
        $defaults = [null, null, null, 'eng-GB', false];
2242
        $contentIdList = [];
2243
        foreach ($contentDataList as $key => $contentData) {
2244
            $contentData = $contentData + $defaults;
2245
            list(
2246
                $fieldValue11,
2247
                $fieldValue12,
2248
                $fieldValue2,
2249
                $mainLanguageCode,
2250
                $alwaysAvailable
2251
            ) = $contentData;
2252
2253
            $contentIdList[$key] = $this->createMultilingualContent(
2254
                $contentType,
2255
                $fieldValue11,
2256
                $fieldValue12,
2257
                $fieldValue2,
2258
                $mainLanguageCode,
2259
                $alwaysAvailable
2260
            )->id;
2261
        }
2262
2263
        // "article" type Content is not matched, this ensures that non-matched
2264
        // field does not affect sort
@@ 2532-2550 (lines=19) @@
2529
2530
        $defaults = [null, null, null, 'eng-GB', false];
2531
        $contentIdList = [];
2532
        foreach ($contentDataList as $key => $contentData) {
2533
            $contentData = $contentData + $defaults;
2534
            list(
2535
                $fieldValue11,
2536
                $fieldValue12,
2537
                $fieldValue2,
2538
                $mainLanguageCode,
2539
                $alwaysAvailable
2540
            ) = $contentData;
2541
2542
            $contentIdList[$key] = $this->createMultilingualContent(
2543
                $contentType,
2544
                $fieldValue11,
2545
                $fieldValue12,
2546
                $fieldValue2,
2547
                $mainLanguageCode,
2548
                $alwaysAvailable
2549
            )->id;
2550
        }
2551
2552
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2553
        $searchService = $repository->getSearchService();