⬆️ 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;
interface Parser {
interface Parser
{
/**
* Parses PHP code into a node tree.
*
@@ -10,8 +11,8 @@ interface Parser {
* @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
* to ErrorHandler\Throwing.
*
* @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was
* unable to recover from an error).
* @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and
* the parser was unable to recover from an error).
*/
public function parse($code, ErrorHandler $errorHandler = null);
public function parse(string $code, ErrorHandler $errorHandler = null);
}