Passed
Pull Request — master (#806)
by Maxim
19:17
created

Raw::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Stempler\Node;
6
7
use Spiral\Stempler\Node\Traits\ContextTrait;
8
use Spiral\Stempler\Parser\Context;
9
10
/**
11
 * Plain text or comment. Might contain inclusion of other syntaxes within it.
12
 *
13
 * @implements NodeInterface<Raw>
14
 */
15
final class Raw implements NodeInterface
16
{
17
    use ContextTrait;
18
19 111
    public function __construct(
20
        public string|int|float $content,
21
        Context $context = null
22
    ) {
23 111
        $this->context = $context;
24
    }
25
26 84
    public function getIterator(): \Generator
27
    {
28 84
        yield from [];
29
    }
30
}
31