Row::getIterator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Terranet\Administrator\Dashboard;
4
5
use Traversable;
6
7
class Row implements \IteratorAggregate
8
{
9
    protected $panels = [];
10
11
    public function panel(Panel $panel)
12
    {
13
        $this->panels[] = $panel;
14
15
        return $panel;
16
    }
17
18
    /**
19
     * Retrieve an external iterator.
20
     *
21
     * @see http://php.net/manual/en/iteratoraggregate.getiterator.php
22
     *
23
     * @return Traversable An instance of an object implementing <b>Iterator</b> or
24
     * <b>Traversable</b>
25
     *
26
     * @since 5.0.0
27
     */
28
    public function getIterator()
29
    {
30
        return new \ArrayIterator($this->panels);
31
    }
32
}
33