RoomResourceRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findAllResurces() 0 4 1
A findByRoom() 0 4 1
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