Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 4448-4453 (lines=6) @@
4445
        foreach ($result->searchHits as $hit) {
4446
            switch (true) {
4447
                case $hit->valueObject instanceof Content:
4448
                case $hit->valueObject instanceof Location:
4449
                    $hit->valueObject = array(
4450
                        'id' => $hit->valueObject->contentInfo->id,
4451
                        'title' => $hit->valueObject->contentInfo->name,
4452
                    );
4453
                    break;
4454
4455
                case $hit->valueObject instanceof ContentInfo:
4456
                    $hit->valueObject = array(

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

@@ 1240-1245 (lines=6) @@
1237
1238
        foreach ($result->searchHits as $hit) {
1239
            switch (true) {
1240
                case $hit->valueObject instanceof Location:
1241
                    $hit->valueObject = array(
1242
                        'id' => $hit->valueObject->contentInfo->id,
1243
                        'title' => $hit->valueObject->contentInfo->name,
1244
                    );
1245
                    break;
1246
1247
                default:
1248
                    throw new \RuntimeException('Unknown search result hit type: ' . get_class($hit->valueObject));