mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Refactor and enhance type hinting across various classes in the Swagger-PHP library
- 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.
This commit is contained in:
parent
4a540ee196
commit
7c9f95b33d
106 changed files with 4068 additions and 3509 deletions
|
@ -120,6 +120,7 @@ class NameResolver extends NodeVisitorAbstract {
|
|||
foreach ($node->consts as $const) {
|
||||
$this->addNamespacedName($const);
|
||||
}
|
||||
$this->resolveAttrGroups($node);
|
||||
} elseif ($node instanceof Stmt\ClassConst) {
|
||||
if (null !== $node->type) {
|
||||
$node->type = $this->resolveType($node->type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue