Completed
Push — master ( b8e29b...ea269f )
by Ítalo
02:50
created

ImmVector   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getIterator() 0 4 1
1
<?php
2
3
namespace Collections\Immutable;
4
5
use Collections\ConstVectorInterface;
6
use Collections\Iterator\VectorIterator;
7
use Collections\Traits\ImmVectorLikeTrait;
8
9
class ImmVector implements ConstVectorInterface, \ArrayAccess
10
{
11
    use ImmVectorLikeTrait;
12
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function __construct($array = null)
17
    {
18
        $this->init($array);
19
    }
20
21
    /**
22
     * Gets the collection's iterator
23
     * @return VectorIterator
24
     */
25
    public function getIterator()
26
    {
27
        return new VectorIterator($this->container);
28
    }
29
}
30