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

ElementExprEach   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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