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

NodeTraverserFactory::getTraverser()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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