ItemRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A findById() 0 4 1
A findAllItems() 0 4 1
A findSeveralByIds() 0 4 1
1
<?php
2
3
namespace Rottenwood\KingdomBundle\Entity\Infrastructure;
4
5
/** {@inheritDoc} */
6
class ItemRepository extends AbstractRepository
7
{
8
9
    /**
10
     * @param int $itemId
11
     * @return Item|null
12
     */
13
    public function findById($itemId)
14
    {
15
        return $this->find($itemId);
16
    }
17
18
    /**
19
     * @return Item[]
20
     */
21
    public function findAllItems()
22
    {
23
        return $this->findAll();
24
    }
25
26
    /**
27
     * @param $starterItemsIds
28
     * @return Item[]
29
     */
30
    public function findSeveralByIds($starterItemsIds)
31
    {
32
        return $this->findBy(['id' => $starterItemsIds]);
33
    }
34
}
35