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

ImmVector::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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