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

ImmMap::getIterator()   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 0
1
<?php
2
3
namespace Collections\Immutable;
4
5
use Collections\ConstMapInterface;
6
use Collections\Iterator\MapIterator;
7
use Collections\Traits\ImmMapLikeTrait;
8
9
class ImmMap implements ConstMapInterface
10
{
11
    use ImmMapLikeTrait;
12
13
    public function __construct($array = null)
14
    {
15
        $this->init($array);
16
    }
17
18
    /**
19
     * Gets the collection's iterator
20
     * @return MapIterator
21
     */
22
    public function getIterator()
23
    {
24
        return new MapIterator($this->container);
25
    }
26
}
27