Passed
Push — main ( 7f60ea...60225c )
by Thierry
08:29
created

ElementExprEach::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
nc 2
nop 2
1
<?php
2
3
namespace Lagdo\UiBuilder\Builder\Html;
4
5
use Closure;
6
7
class ElementExprEach extends ElementExprList
8
{
9
    /**
10
     * The constructor
11
     *
12
     * @param array $items
13
     * @param Closure $closure
14
     */
15
    public function __construct(array $values, Closure $closure)
16
    {
17
        foreach ($values as $key => $value) {
18
            $this->children[] = $closure($value, $key);
19
        }
20
    }
21
}
22