DoctrineArrayCollection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A add() 0 4 1
A remove() 0 4 1
1
<?php
2
3
namespace Saxulum\Accessor\Collection;
4
5
use Doctrine\Common\Collections\Collection;
6
7
class DoctrineArrayCollection implements CollectionInterface
8
{
9
    /**
10
     * @var Collection
11
     */
12
    protected $collection;
13
14
    /**
15
     * @param Collection $collection
16
     */
17
    public function __construct(Collection $collection)
18
    {
19
        $this->collection = $collection;
20
    }
21
22
    /**
23
     * @param  mixed $element
24
     * @return void
25
     */
26
    public function add($element)
27
    {
28
        $this->collection->add($element);
29
    }
30
31
    /**
32
     * @param  mixed $element
33
     * @return void
34
     */
35
    public function remove($element)
36
    {
37
        $this->collection->removeElement($element);
38
    }
39
}
40