From a06179f1ac5c92249c16a770bec21d6fb49b6071 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 7 Aug 2018 18:15:45 +0200 Subject: [PATCH] PhpParser: token_get_all() uses flag TOKEN_PARSE --- src/CodeCoverage/PhpParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeCoverage/PhpParser.php b/src/CodeCoverage/PhpParser.php index 2e755116..877e917a 100644 --- a/src/CodeCoverage/PhpParser.php +++ b/src/CodeCoverage/PhpParser.php @@ -53,7 +53,7 @@ class PhpParser */ public function parse(string $code): \stdClass { - $tokens = @token_get_all($code); // @ - source code can be written in newer PHP + $tokens = token_get_all($code, TOKEN_PARSE); $level = $classLevel = $functionLevel = null; $namespace = '';