Code Duplication    Length = 13-13 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 1 location

@@ 4582-4594 (lines=13) @@
4579
            $closure($result);
4580
        }
4581
4582
        if ($ignoreScore) {
4583
            foreach ([$fixture, $result] as $set) {
4584
                $property = new \ReflectionProperty(get_class($set), 'maxScore');
4585
                $property->setAccessible(true);
4586
                $property->setValue($set, 0.0);
4587
4588
                foreach ($set->searchHits as $hit) {
4589
                    $property = new \ReflectionProperty(get_class($hit), 'score');
4590
                    $property->setAccessible(true);
4591
                    $property->setValue($hit, 0.0);
4592
                }
4593
            }
4594
        }
4595
4596
        foreach ([$fixture, $result] as $set) {
4597
            foreach ($set->searchHits as $hit) {

eZ/Publish/API/Repository/Tests/SearchServiceLocationTest.php 1 location

@@ 1398-1410 (lines=13) @@
1395
            $closure($result);
1396
        }
1397
1398
        if ($ignoreScore) {
1399
            foreach ([$fixture, $result] as $result) {
1400
                $property = new \ReflectionProperty(get_class($result), 'maxScore');
1401
                $property->setAccessible(true);
1402
                $property->setValue($result, 0.0);
1403
1404
                foreach ($result->searchHits as $hit) {
1405
                    $property = new \ReflectionProperty(get_class($hit), 'score');
1406
                    $property->setAccessible(true);
1407
                    $property->setValue($hit, 0.0);
1408
                }
1409
            }
1410
        }
1411
1412
        foreach ([$fixture, $result] as $set) {
1413
            foreach ($set->searchHits as $hit) {