⬆️ N°3867 Upgrade php-parser from 3.1.5 to latest version 4.12.0

The 3.1.5 version wasn't maintained anymore and was compatible with PHP 7.2 maximum
This commit is contained in:
Pierre Goiffon
2021-08-09 14:58:06 +02:00
parent be1ef5b452
commit 9bbee0d603
248 changed files with 12185 additions and 11258 deletions

View File

@@ -1,8 +1,9 @@
<?php
<?php declare(strict_types=1);
namespace PhpParser;
class ParserFactory {
class ParserFactory
{
const PREFER_PHP7 = 1;
const PREFER_PHP5 = 2;
const ONLY_PHP7 = 3;
@@ -17,7 +18,7 @@ class ParserFactory {
*
* @return Parser The parser instance
*/
public function create($kind, Lexer $lexer = null, array $parserOptions = array()) {
public function create(int $kind, Lexer $lexer = null, array $parserOptions = []) : Parser {
if (null === $lexer) {
$lexer = new Lexer\Emulative();
}