Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 2138-2156 (lines=19) @@
2135
2136
        $defaults = array(null, null, null, 'eng-GB', false);
2137
        $contentIdList = array();
2138
        foreach ($contentDataList as $key => $contentData) {
2139
            $contentData = $contentData + $defaults;
2140
            list(
2141
                $fieldValue11,
2142
                $fieldValue12,
2143
                $fieldValue2,
2144
                $mainLanguageCode,
2145
                $alwaysAvailable
2146
            ) = $contentData;
2147
2148
            $contentIdList[$key] = $this->createMultilingualContent(
2149
                $contentType,
2150
                $fieldValue11,
2151
                $fieldValue12,
2152
                $fieldValue2,
2153
                $mainLanguageCode,
2154
                $alwaysAvailable
2155
            )->id;
2156
        }
2157
2158
        // "article" type Content is not matched, this ensures that non-matched
2159
        // field does not affect sort
@@ 2427-2445 (lines=19) @@
2424
2425
        $defaults = array(null, null, null, 'eng-GB', false);
2426
        $contentIdList = array();
2427
        foreach ($contentDataList as $key => $contentData) {
2428
            $contentData = $contentData + $defaults;
2429
            list(
2430
                $fieldValue11,
2431
                $fieldValue12,
2432
                $fieldValue2,
2433
                $mainLanguageCode,
2434
                $alwaysAvailable
2435
            ) = $contentData;
2436
2437
            $contentIdList[$key] = $this->createMultilingualContent(
2438
                $contentType,
2439
                $fieldValue11,
2440
                $fieldValue12,
2441
                $fieldValue2,
2442
                $mainLanguageCode,
2443
                $alwaysAvailable
2444
            )->id;
2445
        }
2446
2447
        $sortClause = new SortClause\Field('test-type', 'integer', Query::SORT_DESC);
2448
        $searchService = $repository->getSearchService();