Completed
Push — master ( 747a6a...c6c655 )
by Ítalo
02:55
created

ImmArrayList::get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 10
loc 10
ccs 0
cts 8
cp 0
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
crap 6
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 ImmArrayList 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