RoomResourceRepository::findAllResurces()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Rottenwood\KingdomBundle\Entity\Infrastructure;
4
5
use Rottenwood\KingdomBundle\Entity\Room;
6
use Rottenwood\KingdomBundle\Entity\RoomResource;
7
8
/** {@inheritDoc} */
9
class RoomResourceRepository extends AbstractRepository
10
{
11
12
    /**
13
     * Поиск всех ресурсов
14
     * @return RoomResource[]
15
     */
16
    public function findAllResurces(): array
17
    {
18
        return $this->findAll();
19
    }
20
21
    /**
22
     * Поиск ресурсов в комнате
23
     * @param Room $room
24
     * @return RoomResource[]
25
     */
26
    public function findByRoom(Room $room): array
27
    {
28
        return $this->findBy(['room' => $room]);
29
    }
30
}
31