name); } /** @return non-empty-string */ public function __toString(): string { return $this->betterReflectionParameter->__toString(); } public function getName(): string { return $this->betterReflectionParameter->getName(); } public function isPassedByReference(): bool { return $this->betterReflectionParameter->isPassedByReference(); } public function canBePassedByValue(): bool { return $this->betterReflectionParameter->canBePassedByValue(); } public function getDeclaringFunction(): CoreReflectionFunctionAbstract { $function = $this->betterReflectionParameter->getDeclaringFunction(); if ($function instanceof BetterReflectionMethod) { return new ReflectionMethod($function); } return new ReflectionFunction($function); } public function getDeclaringClass(): CoreReflectionClass|null { $declaringClass = $this->betterReflectionParameter->getDeclaringClass(); if ($declaringClass === null) { return null; } return new ReflectionClass($declaringClass); } public function getClass(): CoreReflectionClass|null { $type = $this->betterReflectionParameter->getType(); if ($type === null) { return null; } if ($type instanceof BetterReflectionIntersectionType) { return null; } if ($type instanceof BetterReflectionNamedType) { $classType = $type; } else { $unionTypes = $type->getTypes(); if (count($unionTypes) !== 2) { return null; } if (! $type->allowsNull()) { return null; } foreach ($unionTypes as $unionInnerType) { if (! $unionInnerType instanceof BetterReflectionNamedType) { return null; } if ($unionInnerType->allowsNull()) { continue; } $classType = $unionInnerType; break; } } try { /** @phpstan-ignore-next-line */ return new ReflectionClass($classType->getClass()); } catch (LogicException) { return null; } } public function isArray(): bool { return $this->isType($this->betterReflectionParameter->getType(), 'array'); } public function isCallable(): bool { return $this->isType($this->betterReflectionParameter->getType(), 'callable'); } /** * For isArray() and isCallable(). */ private function isType(BetterReflectionNamedType|BetterReflectionUnionType|BetterReflectionIntersectionType|null $typeReflection, string $type): bool { if ($typeReflection === null) { return false; } if ($typeReflection instanceof BetterReflectionIntersectionType) { return false; } $isOneOfAllowedTypes = static function (BetterReflectionType $namedType, string ...$types): bool { foreach ($types as $type) { if ($namedType instanceof BetterReflectionNamedType && strtolower($namedType->getName()) === $type) { return true; } } return false; }; if ($typeReflection instanceof BetterReflectionUnionType) { $unionTypes = $typeReflection->getTypes(); foreach ($unionTypes as $unionType) { if (! $isOneOfAllowedTypes($unionType, $type, 'null')) { return false; } } return true; } return $isOneOfAllowedTypes($typeReflection, $type); } public function allowsNull(): bool { return $this->betterReflectionParameter->allowsNull(); } public function getPosition(): int { return $this->betterReflectionParameter->getPosition(); } public function isOptional(): bool { return $this->betterReflectionParameter->isOptional(); } public function isVariadic(): bool { return $this->betterReflectionParameter->isVariadic(); } public function isDefaultValueAvailable(): bool { return $this->betterReflectionParameter->isDefaultValueAvailable(); } public function getDefaultValue(): mixed { return $this->betterReflectionParameter->getDefaultValue(); } public function isDefaultValueConstant(): bool { return $this->betterReflectionParameter->isDefaultValueConstant(); } public function getDefaultValueConstantName(): string { return $this->betterReflectionParameter->getDefaultValueConstantName(); } public function hasType(): bool { return $this->betterReflectionParameter->hasType(); } public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|ReflectionType|null { return ReflectionType::fromTypeOrNull($this->betterReflectionParameter->getType()); } public function isPromoted(): bool { return $this->betterReflectionParameter->isPromoted(); } /** * @param class-string|null $name * * @return list */ public function getAttributes(string|null $name = null, int $flags = 0): array { if ($flags !== 0 && $flags !== ReflectionAttribute::IS_INSTANCEOF) { throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag'); } if ($name !== null && $flags & ReflectionAttribute::IS_INSTANCEOF) { $attributes = $this->betterReflectionParameter->getAttributesByInstance($name); } elseif ($name !== null) { $attributes = $this->betterReflectionParameter->getAttributesByName($name); } else { $attributes = $this->betterReflectionParameter->getAttributes(); } /** @psalm-suppress ImpureFunctionCall */ return array_map(static fn (BetterReflectionAttribute $betterReflectionAttribute): ReflectionAttribute => new ReflectionAttribute($betterReflectionAttribute), $attributes); } public function __get(string $name): mixed { if ($name === 'name') { return $this->betterReflectionParameter->getName(); } throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name)); } } __halt_compiler();----SIGNATURE:----FqyiVvAPleOFWnfIijp/10/s8MEj4ehnAnSUr7UlnYwyUT25wGgpjU9IyaFTu49pL5qFRS74IRlVbz7ZdrZwLdZochStKDIA0mWvm4vwW3CdbDhqsyajk6Nle5gQGiL/LX3M3Y9RdYoOqgcujOMFAvaVPrOAUng6NL+N8GK5MEckFD+s9c38p3wQZmb5kD/hP8CyGsjBSdRS0lWPg7DCCT313wN7bCEHIgo9OaFgIoCbW7xpd7Hru09GgLEqcENKyr6GDk7Ef7t5yZSESdT8ByMYNUC4PnAXlyW0FKd9Z38/9LCuighfqkxGjZxniJOD4voVj/Lyj7r7m7NTc4Tf+PCLkZHlsom0FKSRI+KDx0guTapuW6UGG59SnC6dryKiCw1AAyJqSXZ8pi69z36judUvknEn7CGVGWxDa3ajM6WvKAt4zxbe+5Wh/2AsuskALMq4BgfKP/p8Xsff6jFh1N8gYXHBoAuKSvlu2ObfDVEf0EoBQzPhgT1Eq9QXvZ1eTtW2uvtKCqfKr6trv3QW6QmikYzLN377K/5ZHdFjbGn4+epgYpQ3NnSreRUpUgkP3Cxnkb3fwtpRt+molwZPPSDZY8YSuPklgG3HHoIhVmY18MKmHgz1TYWDIr+1yWzs5Pf6pzkabrxV8uWIbY9HCuFzg7X5HF+oKZTd7uJZnJg=----ATTACHMENT:----Njc4MDc1NjAzMDQxODYzNyA4OTE5NDcyOTI2NTUxMzI3IDg2MDE2MTg5OTkyMzU5NTE=