InfiniteArrayCollection   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 1
Metric Value
wmc 1
cbo 1
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInfiniteIterator() 0 6 1
1
<?php
2
3
namespace Utils\Collections;
4
5
/**
6
 * Infinite ArrayCollection
7
 */
8
class InfiniteArrayCollection extends ArrayCollection
9
{
10
    /**
11
     * @return \GameDomain\Player\PlayerInterface[]|\InfiniteIterator
12
     */
13
    final public function getInfiniteIterator()
14
    {
15
        $this->first();
16
17
        return new \InfiniteIterator($this->getIterator());
18
    }
19
}
20