Completed
Push — master ( 1bb7d4...9323b7 )
by Petr
02:58
created

ItemRepository   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

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