Updated Rector to commit 560172463933f21b51b8ef306a068dc299f742e5

5601724639 [Dep] Temporary pin to use nikic/php-parser 4.18.0 (#5733)
This commit is contained in:
Tomas Votruba 2024-03-17 07:47:19 +00:00
parent 51090bc214
commit 8d1aee03a3
37 changed files with 53 additions and 53 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = 'ac2bd3f825b11233c07235a195f442be4113d99c'; public const PACKAGE_VERSION = '560172463933f21b51b8ef306a068dc299f742e5';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2024-03-17 14:08:37'; public const RELEASE_DATE = '2024-03-17 14:44:54';
/** /**
* @var int * @var int
*/ */

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8::getLoader(); return ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8 class ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd
{ {
private static $loader; private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit6d421f8e13ae292450b325b178b078dd::getInitializer($loader));
$loader->setClassMapAuthoritative(true); $loader->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8::$files; $filesToLoad = \Composer\Autoload\ComposerStaticInit6d421f8e13ae292450b325b178b078dd::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8 class ComposerStaticInit6d421f8e13ae292450b325b178b078dd
{ {
public static $files = array ( public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2706,9 +2706,9 @@ class ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit6d421f8e13ae292450b325b178b078dd::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit6d421f8e13ae292450b325b178b078dd::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1738583af5734d6ba4a4af91c9f317d8::$classMap; $loader->classMap = ComposerStaticInit6d421f8e13ae292450b325b178b078dd::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -701,28 +701,28 @@
}, },
{ {
"name": "nikic\/php-parser", "name": "nikic\/php-parser",
"version": "v4.19.0", "version": "v4.18.0",
"version_normalized": "4.19.0.0", "version_normalized": "4.18.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https:\/\/github.com\/nikic\/PHP-Parser.git", "url": "https:\/\/github.com\/nikic\/PHP-Parser.git",
"reference": "32cdab9a034239a8f57ae0e9a15bada4bd9747bf" "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/32cdab9a034239a8f57ae0e9a15bada4bd9747bf", "url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"reference": "32cdab9a034239a8f57ae0e9a15bada4bd9747bf", "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": ">=7.1" "php": ">=7.0"
}, },
"require-dev": { "require-dev": {
"ircmaxell\/php-yacc": "^0.0.7", "ircmaxell\/php-yacc": "^0.0.7",
"phpunit\/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" "phpunit\/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
}, },
"time": "2024-03-16T14:49:31+00:00", "time": "2023-12-10T21:03:43+00:00",
"bin": [ "bin": [
"bin\/php-parse" "bin\/php-parse"
], ],
@ -771,7 +771,7 @@
], ],
"support": { "support": {
"issues": "https:\/\/github.com\/nikic\/PHP-Parser\/issues", "issues": "https:\/\/github.com\/nikic\/PHP-Parser\/issues",
"source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.19.0" "source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.18.0"
}, },
"install-path": "..\/nikic\/php-parser" "install-path": "..\/nikic\/php-parser"
}, },

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ PHP Parser
This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and
manipulation. manipulation.
[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.1; for parsing PHP 5.2 to PHP 8.2). [**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2).
[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).

View File

@ -13,7 +13,7 @@
} }
], ],
"require": { "require": {
"php": ">=7.1", "php": ">=7.0",
"ext-tokenizer": "*" "ext-tokenizer": "*"
}, },
"require-dev": { "require-dev": {

View File

@ -35,7 +35,7 @@ class ConstExprEvaluator
* *
* @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated * @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated
*/ */
public function __construct(?callable $fallbackEvaluator = null) public function __construct(callable $fallbackEvaluator = null)
{ {
$this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { $this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) {
throw new \PhpParser\ConstExprEvaluationException("Expression of type {$expr->getType()} cannot be evaluated"); throw new \PhpParser\ConstExprEvaluationException("Expression of type {$expr->getType()} cannot be evaluated");

View File

@ -29,7 +29,7 @@ class PrintableNewAnonClassNode extends Expr
public $implements; public $implements;
/** @var Node\Stmt[] Statements */ /** @var Node\Stmt[] Statements */
public $stmts; public $stmts;
public function __construct(array $attrGroups, int $flags, array $args, ?Node\Name $extends = null, array $implements, array $stmts, array $attributes) public function __construct(array $attrGroups, int $flags, array $args, Node\Name $extends = null, array $implements, array $stmts, array $attributes)
{ {
parent::__construct($attributes); parent::__construct($attributes);
$this->attrGroups = $attrGroups; $this->attrGroups = $attrGroups;

View File

@ -61,7 +61,7 @@ class Lexer
* @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
* ErrorHandler\Throwing * ErrorHandler\Throwing
*/ */
public function startLexing(string $code, ?\PhpParser\ErrorHandler $errorHandler = null) public function startLexing(string $code, \PhpParser\ErrorHandler $errorHandler = null)
{ {
if (null === $errorHandler) { if (null === $errorHandler) {
$errorHandler = new \PhpParser\ErrorHandler\Throwing(); $errorHandler = new \PhpParser\ErrorHandler\Throwing();

View File

@ -56,7 +56,7 @@ class Emulative extends Lexer
} }
} }
} }
public function startLexing(string $code, ?ErrorHandler $errorHandler = null) public function startLexing(string $code, ErrorHandler $errorHandler = null)
{ {
$emulators = \array_filter($this->emulators, function ($emulator) use($code) { $emulators = \array_filter($this->emulators, function ($emulator) use($code) {
return $emulator->isEmulationNeeded($code); return $emulator->isEmulationNeeded($code);

View File

@ -32,7 +32,7 @@ class NameContext
* *
* @param Name|null $namespace Null is the global namespace * @param Name|null $namespace Null is the global namespace
*/ */
public function startNamespace(?Name $namespace = null) public function startNamespace(Name $namespace = null)
{ {
$this->namespace = $namespace; $this->namespace = $namespace;
$this->origAliases = $this->aliases = [Stmt\Use_::TYPE_NORMAL => [], Stmt\Use_::TYPE_FUNCTION => [], Stmt\Use_::TYPE_CONSTANT => []]; $this->origAliases = $this->aliases = [Stmt\Use_::TYPE_NORMAL => [], Stmt\Use_::TYPE_FUNCTION => [], Stmt\Use_::TYPE_CONSTANT => []];

View File

@ -24,7 +24,7 @@ class Arg extends NodeAbstract
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
* @param Identifier|null $name Parameter name (for named parameters) * @param Identifier|null $name Parameter name (for named parameters)
*/ */
public function __construct(\PhpParser\Node\Expr $value, bool $byRef = \false, bool $unpack = \false, array $attributes = [], ?\PhpParser\Node\Identifier $name = null) public function __construct(\PhpParser\Node\Expr $value, bool $byRef = \false, bool $unpack = \false, array $attributes = [], \PhpParser\Node\Identifier $name = null)
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->name = $name; $this->name = $name;

View File

@ -17,7 +17,7 @@ class ArrayDimFetch extends Expr
* @param null|Expr $dim Array index / dim * @param null|Expr $dim Array index / dim
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) public function __construct(Expr $var, Expr $dim = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->var = $var; $this->var = $var;

View File

@ -22,7 +22,7 @@ class ArrayItem extends Expr
* @param bool $byRef Whether to assign by reference * @param bool $byRef Whether to assign by reference
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(Expr $value, ?Expr $key = null, bool $byRef = \false, array $attributes = [], bool $unpack = \false) public function __construct(Expr $value, Expr $key = null, bool $byRef = \false, array $attributes = [], bool $unpack = \false)
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->key = $key; $this->key = $key;

View File

@ -17,7 +17,7 @@ class Exit_ extends Expr
* @param null|Expr $expr Expression * @param null|Expr $expr Expression
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Expr $expr = null, array $attributes = []) public function __construct(Expr $expr = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->expr = $expr; $this->expr = $expr;

View File

@ -17,7 +17,7 @@ class Yield_ extends Expr
* @param null|Expr $key Key expression * @param null|Expr $key Key expression
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) public function __construct(Expr $value = null, Expr $key = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->key = $key; $this->key = $key;

View File

@ -155,7 +155,7 @@ class Name extends NodeAbstract
* *
* @return static|null Sliced name * @return static|null Sliced name
*/ */
public function slice(int $offset, ?int $length = null) public function slice(int $offset, int $length = null)
{ {
$numParts = \count($this->parts); $numParts = \count($this->parts);
$realOffset = $offset < 0 ? $offset + $numParts : $offset; $realOffset = $offset < 0 ? $offset + $numParts : $offset;

View File

@ -32,7 +32,7 @@ class Param extends NodeAbstract
* @param int $flags Optional visibility flags * @param int $flags Optional visibility flags
* @param AttributeGroup[] $attrGroups PHP attribute groups * @param AttributeGroup[] $attrGroups PHP attribute groups
*/ */
public function __construct($var, ?\PhpParser\Node\Expr $default = null, $type = null, bool $byRef = \false, bool $variadic = \false, array $attributes = [], int $flags = 0, array $attrGroups = []) public function __construct($var, \PhpParser\Node\Expr $default = null, $type = null, bool $byRef = \false, bool $variadic = \false, array $attributes = [], int $flags = 0, array $attrGroups = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->type = \is_string($type) ? new \PhpParser\Node\Identifier($type) : $type; $this->type = \is_string($type) ? new \PhpParser\Node\Identifier($type) : $type;

View File

@ -14,7 +14,7 @@ class Break_ extends Node\Stmt
* @param null|Node\Expr $num Number of loops to break * @param null|Node\Expr $num Number of loops to break
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Node\Expr $num = null, array $attributes = []) public function __construct(Node\Expr $num = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->num = $num; $this->num = $num;

View File

@ -22,7 +22,7 @@ class Catch_ extends Node\Stmt implements StmtsAwareInterface
* @param Node\Stmt[] $stmts Statements * @param Node\Stmt[] $stmts Statements
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = []) public function __construct(array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->types = $types; $this->types = $types;

View File

@ -14,7 +14,7 @@ class Continue_ extends Node\Stmt
* @param null|Node\Expr $num Number of loops to continue * @param null|Node\Expr $num Number of loops to continue
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Node\Expr $num = null, array $attributes = []) public function __construct(Node\Expr $num = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->num = $num; $this->num = $num;

View File

@ -17,7 +17,7 @@ class Declare_ extends Node\Stmt
* @param Node\Stmt[]|null $stmts Statements * @param Node\Stmt[]|null $stmts Statements
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(array $declares, ?array $stmts = null, array $attributes = []) public function __construct(array $declares, array $stmts = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->declares = $declares; $this->declares = $declares;

View File

@ -19,7 +19,7 @@ class EnumCase extends Node\Stmt
* @param AttributeGroup[] $attrGroups PHP attribute groups * @param AttributeGroup[] $attrGroups PHP attribute groups
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) public function __construct($name, Node\Expr $expr = null, array $attrGroups = [], array $attributes = [])
{ {
parent::__construct($attributes); parent::__construct($attributes);
$this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->name = \is_string($name) ? new Node\Identifier($name) : $name;

View File

@ -21,7 +21,7 @@ class Namespace_ extends Node\Stmt implements StmtsAwareInterface
* @param null|Node\Stmt[] $stmts Statements * @param null|Node\Stmt[] $stmts Statements
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Node\Name $name = null, $stmts = [], array $attributes = []) public function __construct(Node\Name $name = null, $stmts = [], array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->name = $name; $this->name = $name;

View File

@ -17,7 +17,7 @@ class PropertyProperty extends Node\Stmt
* @param null|Node\Expr $default Default value * @param null|Node\Expr $default Default value
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct($name, ?Node\Expr $default = null, array $attributes = []) public function __construct($name, Node\Expr $default = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name;

View File

@ -14,7 +14,7 @@ class Return_ extends Node\Stmt
* @param null|Node\Expr $expr Expression * @param null|Node\Expr $expr Expression
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(?Node\Expr $expr = null, array $attributes = []) public function __construct(Node\Expr $expr = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->expr = $expr; $this->expr = $expr;

View File

@ -18,7 +18,7 @@ class StaticVar extends Node\Stmt
* @param null|Node\Expr $default Default value * @param null|Node\Expr $default Default value
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(Expr\Variable $var, ?Node\Expr $default = null, array $attributes = []) public function __construct(Expr\Variable $var, Node\Expr $default = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->var = $var; $this->var = $var;

View File

@ -21,7 +21,7 @@ class TryCatch extends Node\Stmt implements StmtsAwareInterface
* @param null|Finally_ $finally Optional finally node * @param null|Finally_ $finally Optional finally node
* @param array $attributes Additional attributes * @param array $attributes Additional attributes
*/ */
public function __construct(array $stmts, array $catches, ?\PhpParser\Node\Stmt\Finally_ $finally = null, array $attributes = []) public function __construct(array $stmts, array $catches, \PhpParser\Node\Stmt\Finally_ $finally = null, array $attributes = [])
{ {
$this->attributes = $attributes; $this->attributes = $attributes;
$this->stmts = $stmts; $this->stmts = $stmts;

View File

@ -38,7 +38,7 @@ class NodeDumper
* *
* @return string Dumped value * @return string Dumped value
*/ */
public function dump($node, ?string $code = null) : string public function dump($node, string $code = null) : string
{ {
$this->code = $code; $this->code = $code;
return $this->dumpRecursive($node); return $this->dumpRecursive($node);

View File

@ -32,7 +32,7 @@ class NameResolver extends NodeVisitorAbstract
* @param ErrorHandler|null $errorHandler Error handler * @param ErrorHandler|null $errorHandler Error handler
* @param array $options Options * @param array $options Options
*/ */
public function __construct(?ErrorHandler $errorHandler = null, array $options = []) public function __construct(ErrorHandler $errorHandler = null, array $options = [])
{ {
$this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing());
$this->preserveOriginalNames = $options['preserveOriginalNames'] ?? \false; $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? \false;
@ -150,7 +150,7 @@ class NameResolver extends NodeVisitorAbstract
} }
return null; return null;
} }
private function addAlias(Stmt\UseUse $use, int $type, ?Name $prefix = null) private function addAlias(Stmt\UseUse $use, int $type, Name $prefix = null)
{ {
// Add prefix for group uses // Add prefix for group uses
$name = $prefix ? Name::concat($prefix, $use->name) : $use->name; $name = $prefix ? Name::concat($prefix, $use->name) : $use->name;

View File

@ -15,5 +15,5 @@ interface Parser
* @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * @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). * the parser was unable to recover from an error).
*/ */
public function parse(string $code, ?\PhpParser\ErrorHandler $errorHandler = null); public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null);
} }

View File

@ -23,7 +23,7 @@ class Multiple implements Parser
{ {
$this->parsers = $parsers; $this->parsers = $parsers;
} }
public function parse(string $code, ?ErrorHandler $errorHandler = null) public function parse(string $code, ErrorHandler $errorHandler = null)
{ {
if (null === $errorHandler) { if (null === $errorHandler) {
$errorHandler = new ErrorHandler\Throwing(); $errorHandler = new ErrorHandler\Throwing();

View File

@ -139,7 +139,7 @@ abstract class ParserAbstract implements \PhpParser\Parser
* @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * @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). * the parser was unable to recover from an error).
*/ */
public function parse(string $code, ?\PhpParser\ErrorHandler $errorHandler = null) public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null)
{ {
$this->errorHandler = $errorHandler ?: new \PhpParser\ErrorHandler\Throwing(); $this->errorHandler = $errorHandler ?: new \PhpParser\ErrorHandler\Throwing();
$this->lexer->startLexing($code, $this->errorHandler); $this->lexer->startLexing($code, $this->errorHandler);

View File

@ -20,7 +20,7 @@ class ParserFactory
* *
* @return Parser The parser instance * @return Parser The parser instance
*/ */
public function create(int $kind, ?\PhpParser\Lexer $lexer = null, array $parserOptions = []) : \PhpParser\Parser public function create(int $kind, \PhpParser\Lexer $lexer = null, array $parserOptions = []) : \PhpParser\Parser
{ {
if (null === $lexer) { if (null === $lexer) {
$lexer = new \PhpParser\Lexer\Emulative(); $lexer = new \PhpParser\Lexer\Emulative();

View File

@ -30,7 +30,7 @@ if (!function_exists('humbug_phpscoper_expose_class')) {
} }
} }
humbug_phpscoper_expose_class('AutoloadIncluder', 'RectorPrefix202403\AutoloadIncluder'); humbug_phpscoper_expose_class('AutoloadIncluder', 'RectorPrefix202403\AutoloadIncluder');
humbug_phpscoper_expose_class('ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8', 'RectorPrefix202403\ComposerAutoloaderInit1738583af5734d6ba4a4af91c9f317d8'); humbug_phpscoper_expose_class('ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd', 'RectorPrefix202403\ComposerAutoloaderInit6d421f8e13ae292450b325b178b078dd');
humbug_phpscoper_expose_class('Product', 'RectorPrefix202403\Product'); humbug_phpscoper_expose_class('Product', 'RectorPrefix202403\Product');
// Function aliases. For more information see: // Function aliases. For more information see: