Conditions | 4 |
Paths | 6 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4.0092 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | 1 | protected function doInitialize() |
|
46 | { |
||
47 | 1 | $this->collection = new ArrayCollection(); |
|
48 | |||
49 | 1 | foreach ($this->prefetched as $element) { |
|
50 | $this->collection->add($element); |
||
51 | 1 | } |
|
52 | |||
53 | 1 | foreach ($this->matcher->matching($this->criteria) as $element) { |
|
54 | 1 | if (!$this->collection->contains($element)) { |
|
55 | 1 | $this->collection->add($element); |
|
56 | 1 | } |
|
57 | 1 | } |
|
58 | |||
59 | 1 | $this->collection = $this->collection->matching($this->criteria); |
|
60 | 1 | } |
|
61 | } |
||
62 |