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:----edgGN9Vbp54okYF+Xvkshmb0WRu20s03Uk9nY+hWXc1NmA5HaQAgnurTtMCeLrx7nbZ0u6kVorAJoKDH5cVD9Z1hrELfws2DYfUJEIBj+soFGItRqiJMtemKf62POKo2KU9yuc9//ffF+SeDjzQWWTA87zYhJK3+Mf97Lm/prNleidYfY5V4vsPnhl5p46drks8gNrwPA5P5tub4c9mgQDL1GSx1lhRFpGckMGEqUuxAv4/izWSDkD6SnWX+tQ/yQehuc7LGcEsKgfgejkSKueu85YDqBGpaAaa7JlUHLqbBhIskomPX1ls2g+f6D92N8sGoSptXome5mubN+6HGCTwPxsEV7FUX+gG9nsSNAspDU+cqos48W2Cdhs3ROO0my0iODTcMJ2yqysTV1HIZAEKQBCdi7ggnZB+PHzjwLv7Cutf41HEE+fjCcoidxNgvJHHKxSK53e7/dDXsU5N3aQ5PhNkUlWdYyKWJR8+IUOKh9Pgi/j8YmuqX4B0wsAnWJzT9P1otEi0YilbPFfmoTC75A6TxjhCXimSHkStKn4h0gAF0e2Rh/tPBxT1bUcXNkMm3llo4AzYhgUNJbOkg8hC1vRXx678CtDDyaCaQkZv3Fk31wEUBda/fpxuUPlfnXKMl1vhOwFzhcX1uULTOhhTm/9iTb6Qeu3CGYNWzWU8=----ATTACHMENT:----ODg4NjE5NTI3NzU2NTEzOSA1MjIxMDgzOTc1NjY3NzcxIDQ2ODA2NzIyOTY4OTkyMDM=