Passed
Pull Request — master (#993)
by Maxim
20:44 queued 10:42
created

PrettyPrintBootloader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Stempler\Bootloader;
6
7
use Spiral\Boot\Bootloader\Bootloader;
8
use Spiral\Stempler\Builder;
9
use Spiral\Stempler\Visitor\FlattenNodes;
10
use Spiral\Stempler\Visitor\FormatHTML;
11
12
/**
13
 * Prettifies HTML output.
14
 */
15
final class PrettyPrintBootloader extends Bootloader
16
{
17 28
    public function init(StemplerBootloader $stempler): void
18
    {
19 28
        $stempler->addVisitor(FlattenNodes::class, Builder::STAGE_COMPILE);
20 28
        $stempler->addVisitor(FormatHTML::class, Builder::STAGE_COMPILE);
21
    }
22
}
23