BracketingPrinter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A preprocessNodes() 0 5 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