Code Duplication    Length = 19-19 lines in 2 locations

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

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