getName()); } /** * Get class reflection object * * @return null|ClassReflection */ #[ReturnTypeWillChange] public function getClass() { $type = parent::getType(); if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { return null; } return new ClassReflection($type->getName()); } /** * Get declaring function reflection object * * @return FunctionReflection|MethodReflection */ #[ReturnTypeWillChange] public function getDeclaringFunction() { $function = parent::getDeclaringFunction(); if ($function instanceof ReflectionMethod) { return new MethodReflection($function->getDeclaringClass()->getName(), $function->getName()); } return new FunctionReflection($function->getName()); } /** * Get parameter type * * @deprecated this method is unreliable, and should not be used: it will be removed in the next major release. * It may crash on parameters with union types, and will return relative types, instead of * FQN references * * @return string|null */ public function detectType() { if ( null !== ($type = $this->getType()) && $type->isBuiltin() ) { return $type->getName(); } if (null !== $type && $type->getName() === 'self') { $declaringClass = $this->getDeclaringClass(); assert($declaringClass !== null, 'A parameter called `self` can only exist on a class'); return $declaringClass->getName(); } if (($class = $this->getClass()) instanceof ReflectionClass) { return $class->getName(); } $docBlock = $this->getDeclaringFunction()->getDocBlock(); if (! $docBlock instanceof DocBlockReflection) { return null; } /** @var ParamTag[] $params */ $params = $docBlock->getTags('param'); $paramTag = $params[$this->getPosition()] ?? null; $variableName = '$' . $this->getName(); if ($paramTag && ('' === $paramTag->getVariableName() || $variableName === $paramTag->getVariableName())) { return $paramTag->getTypes()[0] ?? ''; } foreach ($params as $param) { if ($param->getVariableName() === $variableName) { return $param->getTypes()[0] ?? ''; } } return null; } /** * @return string */ public function toString() { return parent::__toString(); } public function isPublicPromoted(): bool { $property = $this->promotedProperty(); if ($property === null) { return false; } return (bool) ($property->getModifiers() & ReflectionProperty::IS_PUBLIC); } public function isProtectedPromoted(): bool { $property = $this->promotedProperty(); if ($property === null) { return false; } return (bool) ($property->getModifiers() & ReflectionProperty::IS_PROTECTED); } public function isPrivatePromoted(): bool { $property = $this->promotedProperty(); if ($property === null) { return false; } return (bool) ($property->getModifiers() & ReflectionProperty::IS_PRIVATE); } private function promotedProperty(): ?ReflectionProperty { if (! $this->isPromoted()) { return null; } $declaringClass = $this->getDeclaringClass(); assert($declaringClass !== null, 'Promoted properties are always part of a class'); return $declaringClass->getProperty($this->getName()); } }__halt_compiler();----SIGNATURE:----MVuKoWK2SezlkOuyyWEMQVy7gmNbg4QfZk5v1I5oVOydj4k3vyKxJB44CnvaR+HMsjQAV8oJgn/oMvur5NM63FmC+Xqc39/VZSTH1g6+8yC22AwQBlj8PBTu+p7amiujnuBdsT+rmsTV+cfsxEYn3sCI1pRTFryLtXALlk3Xnsk5B9xhCAK0qkYE8p837ktjISo02KqpXKRw5sNylPtmWns/qSKfpcWlGgYPcODV23OrJDQyphAoHFLmVMx/nAPy4fy8XP0wIOTZdLnAdgj1pUSGkgxjlXnFrHRmc0878OED9pvQ2cX65GzvffTHGmixImdnPYiu3XlaCpB4CIiJXn2zXUwy/kzzT9fNymgMcSD2BnEgUGc4qRMEIvRsNoekIJ9G2Cn9Mtwm8oBKVxq7t78Rq9d3pNdCfi9yaIVzNA7Xt/hIcxPjuMp7OxQ82IN03g89VSEefm2Jpp+/UBr4fhgw5n8xNs88brbhYN6WhjCBsWUQBtQsz6kZK6QOMb4OGnN4DPdMqO8a6AWklBg/WUFlD3WJa1cTDGzpgo4/IB9YAHzeatOlk5lUqVZ1tSiCL1tR4+3pEHFU4l4O3muXPCVQ3BOWyLvf+EDxlUVGnECO8T+ha27lB5dH/K80EVYiSYoO7cQ4OypTwUrx3P8FSIbAeM1+tH7sdaLpTLg3rwk=----ATTACHMENT:----MzIyMjQ0NDUxOTA3NjI5NCAyMjQ0NDg3NjE2MzMyNzM5IDQwNTc3MTg2NTQ2OTM0ODI=