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

PhpFileNodeParser::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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