Code Duplication    Length = 13-13 lines in 2 locations

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) {

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

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