CriteriaCollection::getAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Napp\Core\Dbal\Criteria;
4
5
class CriteriaCollection implements CriteriaCollectionInterface
6
{
7
    /**
8
     * @var CriterionInterface[]
9
     */
10
    protected $criteria;
11
12
    /**
13
     * @param CriterionInterface $criterion
14
     *
15
     * @return $this
16
     */
17
    public function add(CriterionInterface $criterion)
18
    {
19
        $this->criteria[] = $criterion;
20
21
        return $this;
22
    }
23
24
    /**
25
     * @return $this
26
     */
27
    public function reset()
28
    {
29
        $this->criteria = [];
30
31
        return $this;
32
    }
33
34
    /**
35
     * @return CriterionInterface[]
36
     */
37
    public function getAll()
38
    {
39
        return $this->criteria;
40
    }
41
}
42