Total Complexity | 7 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | abstract class AbstractCollection implements \IteratorAggregate, \Countable, CollectionInterface |
||
11 | { |
||
12 | protected $entities = []; |
||
13 | |||
14 | /** |
||
15 | * @param array $entities |
||
16 | */ |
||
17 | public function __construct(array $entities = []) |
||
18 | { |
||
19 | $this->entities = $entities; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function add(EntityInterface $entity) |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function get($idx) |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return \ArrayIterator |
||
46 | */ |
||
47 | public function getIterator() |
||
51 | } |
||
52 | } |
||
53 | |||
54 | public function count() |
||
59 |