Row   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 24
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
eloc 5
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIterator() 0 3 1
A panel() 0 5 1
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