File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/PHPSemVerChecker/Scanner Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 24
24
25
25
"hassankhan/config" : " ~0.9" ,
26
26
"herrera-io/phar-update" : " ~2.0" ,
27
- "nikic/php-parser" : " ~1.3 " ,
27
+ "nikic/php-parser" : " ~2.0 " ,
28
28
"symfony/console" : " ~2.7|~3.0" ,
29
29
"symfony/yaml" : " ~2.7|~3.0" ,
30
30
"tomzx/finder" : " ~0.1"
Original file line number Diff line number Diff line change 3
3
namespace PHPSemVerChecker \Scanner ;
4
4
5
5
use PhpParser \Error ;
6
- use PhpParser \Lexer \Emulative ;
7
6
use PhpParser \NodeTraverser ;
8
7
use PhpParser \NodeVisitor \NameResolver ;
9
- use PhpParser \Parser ;
8
+ use PhpParser \ParserFactory ;
10
9
use PHPSemVerChecker \Registry \Registry ;
11
10
use PHPSemVerChecker \Visitor \ClassVisitor ;
12
11
use PHPSemVerChecker \Visitor \FunctionVisitor ;
13
12
use PHPSemVerChecker \Visitor \InterfaceVisitor ;
14
13
use PHPSemVerChecker \Visitor \TraitVisitor ;
15
14
use RuntimeException ;
16
15
17
- class Scanner {
16
+ class Scanner
17
+ {
18
18
/**
19
19
* @var \PHPSemVerChecker\Registry\Registry
20
20
*/
@@ -31,7 +31,7 @@ class Scanner {
31
31
public function __construct ()
32
32
{
33
33
$ this ->registry = new Registry ();
34
- $ this ->parser = new Parser (new Emulative () );
34
+ $ this ->parser = (new ParserFactory ())-> create (ParserFactory:: PREFER_PHP7 );
35
35
$ this ->traverser = new NodeTraverser ();
36
36
37
37
$ visitors = [
You can’t perform that action at this time.
0 commit comments