mirror of
https://github.com/danog/psalm-not-empty.git
synced 2024-11-26 20:04:54 +01:00
fix bug
This commit is contained in:
parent
1592ce9fe5
commit
1615f8c447
@ -63,6 +63,11 @@ class NotEmptyHooks implements AfterExpressionAnalysisInterface
|
||||
$type->removeType('null');
|
||||
}
|
||||
|
||||
if($type->isSingle()){
|
||||
//we removed null but the type is still not single
|
||||
return true;
|
||||
}
|
||||
|
||||
$atomic_types = $type->getAtomicTypes();
|
||||
$atomic_type = array_shift($atomic_types);
|
||||
if ($atomic_type instanceof Atomic\TInt) {
|
||||
|
Loading…
Reference in New Issue
Block a user