Passed
Push — master ( 6d2fbf...b5fd66 )
by Théo
02:44 queued 48s
created

StandardPrinter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Humbug\PhpScoper\PhpParser\Printer;
6
7
use PhpParser\PrettyPrinterAbstract;
8
9
final class StandardPrinter implements Printer
10
{
11
    private PrettyPrinterAbstract $decoratedPrinter;
12
13
    public function __construct(
14
        PrettyPrinterAbstract $decoratedPrinter
15
    ) {
16
17
        $this->decoratedPrinter = $decoratedPrinter;
18
    }
19
20
    public function print(array $statements): string
21
    {
22
        return $this->decoratedPrinter->prettyPrintFile($statements)."\n";
23
    }
24
}
25