Passed
Push — master ( a2340d...9d7d2b )
by butschster
06:32
created

Hidden   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
eloc 3
dl 0
loc 19
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getContext() 0 3 1
A getIterator() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Stempler\Node;
6
7
use Spiral\Stempler\Parser\Context;
8
9
/**
10
 * Allow traversing but do not render.
11
 *
12
 * @implements NodeInterface<Hidden>
13
 * @template TNode of NodeInterface
14
 */
15
final class Hidden implements NodeInterface
16
{
17
    /** @param TNode[] $nodes */
18 1
    public function __construct(
19
        public array $nodes
20
    ) {
21 1
    }
22
23
    /**
24
     * @return \Generator<string, TNode[]>
25
     */
26 1
    public function getIterator(): \Generator
27
    {
28 1
        yield 'nodes' => $this->nodes;
29
    }
30
31
    public function getContext(): ?Context
32
    {
33
        return null;
34
    }
35
}
36