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

Twig2Visitor   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10
ccs 0
cts 12
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A enterNode() 0 4 1
A leaveNode() 0 4 1
A getPriority() 0 4 1
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