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

ImmMap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
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 18
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\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