CommentStripper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A leaveNode() 0 4 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\Action;
13
14
use PhpParser\NodeVisitorAbstract;
15
use PhpParser\Node;
16
17
/**
18
 * Strip comments
19
 *
20
 * @author Hannes Forsgård <[email protected]>
21
 */
22
class CommentStripper extends NodeVisitorAbstract
23
{
24
    public function leaveNode(Node $node)
25
    {
26
        $node->setAttribute('comments', []);
27
    }
28
}
29