Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -3,23 +3,23 @@
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
use PhpParser\Node\PropertyItem;
abstract class ClassLike extends Node\Stmt
{
abstract class ClassLike extends Node\Stmt {
/** @var Node\Identifier|null Name */
public $name;
public ?Node\Identifier $name;
/** @var Node\Stmt[] Statements */
public $stmts;
public array $stmts;
/** @var Node\AttributeGroup[] PHP attribute groups */
public $attrGroups;
public array $attrGroups;
/** @var Node\Name Namespaced name (if using NameResolver) */
public $namespacedName;
/** @var Node\Name|null Namespaced name (if using NameResolver) */
public ?Node\Name $namespacedName;
/**
* @return TraitUse[]
*/
public function getTraitUses() : array {
public function getTraitUses(): array {
$traitUses = [];
foreach ($this->stmts as $stmt) {
if ($stmt instanceof TraitUse) {
@@ -32,7 +32,7 @@ abstract class ClassLike extends Node\Stmt
/**
* @return ClassConst[]
*/
public function getConstants() : array {
public function getConstants(): array {
$constants = [];
foreach ($this->stmts as $stmt) {
if ($stmt instanceof ClassConst) {
@@ -45,7 +45,7 @@ abstract class ClassLike extends Node\Stmt
/**
* @return Property[]
*/
public function getProperties() : array {
public function getProperties(): array {
$properties = [];
foreach ($this->stmts as $stmt) {
if ($stmt instanceof Property) {
@@ -62,11 +62,11 @@ abstract class ClassLike extends Node\Stmt
*
* @return Property|null Property node or null if the property does not exist
*/
public function getProperty(string $name) {
public function getProperty(string $name): ?Property {
foreach ($this->stmts as $stmt) {
if ($stmt instanceof Property) {
foreach ($stmt->props as $prop) {
if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) {
if ($prop instanceof PropertyItem && $name === $prop->name->toString()) {
return $stmt;
}
}
@@ -80,7 +80,7 @@ abstract class ClassLike extends Node\Stmt
*
* @return ClassMethod[]
*/
public function getMethods() : array {
public function getMethods(): array {
$methods = [];
foreach ($this->stmts as $stmt) {
if ($stmt instanceof ClassMethod) {
@@ -97,7 +97,7 @@ abstract class ClassLike extends Node\Stmt
*
* @return ClassMethod|null Method node or null if the method does not exist
*/
public function getMethod(string $name) {
public function getMethod(string $name): ?ClassMethod {
$lowerName = strtolower($name);
foreach ($this->stmts as $stmt) {
if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {