/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/illuminate/container
Edit: /opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/illuminate/container/Util.php (2225B)
getType();
if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
return null;
}
$name = $type->getName();
if (!\is_null($class = $parameter->getDeclaringClass())) {
if ($name === 'self') {
return $class->getName();
}
if ($name === 'parent' && ($parent = $class->getParentClass())) {
return $parent->getName();
}
}
return $name;
}
/**
* Get a contextual attribute from a dependency.
*
* @param \ReflectionParameter $dependency
* @return \ReflectionAttribute|null
*/
public static function getContextualAttributeFromDependency($dependency)
{
return (\method_exists($dependency, 'getAttributes') ? $dependency->getAttributes(ContextualAttribute::class, ReflectionAttribute::IS_INSTANCEOF) : [])[0] ?? null;
}
}