Completed
Push — master ( a423a5...0fdb96 )
by Tobias
03:31
created

Twig2Visitor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Extractor\Visitor\Twig;
13
14
use Twig_Environment;
15
use Twig_Node;
16
17
/**
18
 * @author Tobias Nyholm <[email protected]>
19
 */
20
final class Twig2Visitor extends TwigVisitor implements \Twig_NodeVisitorInterface
21
{
22
    public function enterNode(Twig_Node $node, Twig_Environment $env)
23
    {
24
        return $this->doEnterNode($node);
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->doEnterNode($node); of type Twig_Node|Twig_NodeInterface adds the type Twig_NodeInterface to the return on line 24 which is incompatible with the return type declared by the interface Twig_NodeVisitorInterface::enterNode of type Twig_Node.
Loading history...
25
    }
26
27
    public function leaveNode(Twig_Node $node, Twig_Environment $env)
28
    {
29
        return $node;
30
    }
31
32
    public function getPriority()
33
    {
34
        return 0;
35
    }
36
}
37