mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -118,7 +118,7 @@ final class PhpDocTypeHelper
|
||||
|
||||
[$phpType, $class] = $this->getPhpTypeAndClass((string) $fqsen);
|
||||
|
||||
$collection = \is_a($class, \Traversable::class, true) || \is_a($class, \ArrayAccess::class, true);
|
||||
$collection = is_a($class, \Traversable::class, true) || is_a($class, \ArrayAccess::class, true);
|
||||
|
||||
// it's safer to fall back to other extractors if the generic type is too abstract
|
||||
if (!$collection && !class_exists($class)) {
|
||||
|
||||
@@ -125,7 +125,7 @@ final class PhpStanTypeHelper
|
||||
return [$mainType];
|
||||
}
|
||||
|
||||
$collection = $mainType->isCollection() || \is_a($mainType->getClassName(), \Traversable::class, true) || \is_a($mainType->getClassName(), \ArrayAccess::class, true);
|
||||
$collection = $mainType->isCollection() || is_a($mainType->getClassName(), \Traversable::class, true) || is_a($mainType->getClassName(), \ArrayAccess::class, true);
|
||||
|
||||
// it's safer to fall back to other extractors if the generic type is too abstract
|
||||
if (!$collection && !class_exists($mainType->getClassName()) && !interface_exists($mainType->getClassName(), false)) {
|
||||
|
||||
Reference in New Issue
Block a user