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

ValueNodeParser::invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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