Completed
Push — develop ( 763ea8...df26dc )
by Paul
01:58
created

PhpFileNodeParser   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace PhpUnitGen\Parser\NodeParser;
4
5
use PhpParser\Node;
6
7
/**
8
 * Class PhpFileNodeParser.
9
 *
10
 * @author     Paul Thébaud <[email protected]>.
11
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
12
 * @license    https://opensource.org/licenses/MIT The MIT license.
13
 * @link       https://github.com/paul-thebaud/phpunit-generator
14
 * @since      Class available since Release 2.0.0.
15
 */
16
class PhpFileNodeParser extends AbstractNodeParser
17
{
18
    public function __construct(
19
        NamespaceNodeParser $namespaceNodeParser,
20
        UseNodeParser $useNodeParser,
21
        TraitNodeParser $traitNodeParser
22
    ) {
23
        $this->nodeParsers[Node\Stmt\Namespace_::class] = $namespaceNodeParser;
24
        $this->nodeParsers[Node\Stmt\Use_::class]       = $useNodeParser;
25
        $this->nodeParsers[Node\Stmt\Trait_::class]     = $traitNodeParser;
26
        /** @todo */
27
    }
28
}
29