mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°5122 - Update libs to new PHP requirements
This commit is contained in:
@@ -32,6 +32,11 @@ class ProxyHelper
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::getTypeHintForType($type, $r, $noBuiltin);
|
||||
}
|
||||
|
||||
private static function getTypeHintForType(\ReflectionType $type, \ReflectionFunctionAbstract $r, bool $noBuiltin): ?string
|
||||
{
|
||||
$types = [];
|
||||
$glue = '|';
|
||||
if ($type instanceof \ReflectionUnionType) {
|
||||
@@ -46,6 +51,17 @@ class ProxyHelper
|
||||
}
|
||||
|
||||
foreach ($reflectionTypes as $type) {
|
||||
if ($type instanceof \ReflectionIntersectionType) {
|
||||
$typeHint = self::getTypeHintForType($type, $r, $noBuiltin);
|
||||
if (null === $typeHint) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$types[] = sprintf('(%s)', $typeHint);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($type->isBuiltin()) {
|
||||
if (!$noBuiltin) {
|
||||
$types[] = $type->getName();
|
||||
|
||||
Reference in New Issue
Block a user