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

ItemRepository::findSeveralByIds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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