BracketingPrinter::preprocessNodes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * This program is free software. It comes without any warranty, to
4
 * the extent permitted by applicable law. You can redistribute it
5
 * and/or modify it under the terms of the Do What The Fuck You Want
6
 * To Public License, Version 2, as published by Sam Hocevar. See
7
 * http://www.wtfpl.net/ for more details.
8
 */
9
10
declare(strict_types = 1);
11
12
namespace hanneskod\classtools\Transformer;
13
14
use PhpParser\PrettyPrinter\Standard;
15
16
/**
17
 * Printer that always uses brackeded namespaces
18
 *
19
 * @author Hannes Forsgård <[email protected]>
20
 */
21
class BracketingPrinter extends Standard
22
{
23
    /**
24
     * Force canUseSemicolonNamespaces to false
25
     */
26
    protected function preprocessNodes(array $nodes): void
27
    {
28
        parent::preprocessNodes($nodes);
29
        $this->canUseSemicolonNamespaces = false;
30
    }
31
}
32