Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 1316-1328 (lines=13) @@
1313
            $closure($result);
1314
        }
1315
1316
        if ($ignoreScore) {
1317
            foreach ([$fixture, $result] as $result) {
1318
                $property = new \ReflectionProperty(get_class($result), 'maxScore');
1319
                $property->setAccessible(true);
1320
                $property->setValue($result, 0.0);
1321
1322
                foreach ($result->searchHits as $hit) {
1323
                    $property = new \ReflectionProperty(get_class($hit), 'score');
1324
                    $property->setAccessible(true);
1325
                    $property->setValue($hit, 0.0);
1326
                }
1327
            }
1328
        }
1329
1330
        foreach ([$fixture, $result] as $set) {
1331
            foreach ($set->searchHits as $hit) {

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

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