Completed
Push — develop ( 1b34c6...481302 )
by Paul
02:47
created

ValueNodeParser   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 invoke() 0 3 1
1
<?php
2
3
namespace PhpUnitGen\Parser\NodeParser;
4
5
use PhpParser\Node;
6
use PhpUnitGen\Model\PropertyInterface\VariableLikeInterface;
7
use PhpUnitGen\Parser\NodeParser\NodeParserInterface\ValueNodeParserInterface;
8
9
/**
10
 * Class ValueNodeParser.
11
 *
12
 * @author     Paul Thébaud <[email protected]>.
13
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
14
 * @license    https://opensource.org/licenses/MIT The MIT license.
15
 * @link       https://github.com/paul-thebaud/phpunit-generator
16
 * @since      Class available since Release 2.0.0.
17
 */
18
class ValueNodeParser extends AbstractNodeParser implements ValueNodeParserInterface
19
{
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * This method do nothing because parsing expr is hard and useless for PhpUnitGen.
24
     */
25
    public function invoke(Node\Expr $node, VariableLikeInterface $parent): VariableLikeInterface
26
    {
27
        return $parent;
28
    }
29
}
30