Completed
Pull Request — master (#435)
by
unknown
01:54
created

NodeTraverserFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTraverser() 0 8 2
1
<?php
2
3
namespace Hal\Component\Ast;
4
5
final class NodeTraverserFactory
6
{
7
    /** @return CustomNodeTraverser */
8
    public function getTraverser($stopCondition = null)
9
    {
10
        if (PHP_VERSION_ID >= 70000) {
11
            return new Php7NodeTraverser($stopCondition);
12
        }
13
14
        return new Php5NodeTraverser($stopCondition);
15
    }
16
}
17