mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00

- Updated error handling in TokenScanner to use more descriptive variable names. - Added return type declarations for methods in Analysis, AbstractAnnotation, Components, Items, License, OpenApi, Operation, Parameter, Response, Schema, Context, Generator, and several processors to improve code clarity and type safety. - Introduced new PipeOperatorEmulator and VoidCastEmulator classes to support PHP 8.5 features. - Implemented Pipe binary operator and Void cast node classes to enhance the parser's capabilities. - Improved array filtering and lambda function type hints for better readability and performance. - Enhanced the handling of annotations and context in various processors to ensure consistent behavior and reduce potential errors.
29 lines
652 B
PHP
29 lines
652 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace PhpParser\Node;
|
|
|
|
use PhpParser\Node;
|
|
use PhpParser\NodeAbstract;
|
|
|
|
class MatchArm extends NodeAbstract {
|
|
/** @var null|list<Node\Expr> */
|
|
public ?array $conds;
|
|
public Expr $body;
|
|
|
|
/**
|
|
* @param null|list<Node\Expr> $conds
|
|
*/
|
|
public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
|
|
$this->conds = $conds;
|
|
$this->body = $body;
|
|
$this->attributes = $attributes;
|
|
}
|
|
|
|
public function getSubNodeNames(): array {
|
|
return ['conds', 'body'];
|
|
}
|
|
|
|
public function getType(): string {
|
|
return 'MatchArm';
|
|
}
|
|
}
|