File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ public function equals(Type $type): bool
458
458
459
459
public function isCallable (): TrinaryLogic
460
460
{
461
- $ typeAndMethods = $ this ->findTypeAndMethodNames ();
461
+ $ typeAndMethods = $ this ->findTypeAndMethodNames (false );
462
462
if ($ typeAndMethods === []) {
463
463
return TrinaryLogic::createNo ();
464
464
}
@@ -561,7 +561,7 @@ public function findTypeAndMethodName(): ?ConstantArrayTypeAndMethod
561
561
}
562
562
563
563
/** @return ConstantArrayTypeAndMethod[] */
564
- public function findTypeAndMethodNames (): array
564
+ public function findTypeAndMethodNames (bool $ atLeastMaybe = true ): array
565
565
{
566
566
$ callableArray = $ this ->getClassOrObjectAndMethods ();
567
567
if ($ callableArray === []) {
@@ -594,7 +594,9 @@ public function findTypeAndMethodNames(): array
594
594
}
595
595
}
596
596
597
- $ typeAndMethods [] = ConstantArrayTypeAndMethod::createConcrete ($ type , $ method ->getValue (), $ has );
597
+ if (!$ atLeastMaybe || !$ has ->no ()) {
598
+ $ typeAndMethods [] = ConstantArrayTypeAndMethod::createConcrete ($ type , $ method ->getValue (), $ has );
599
+ }
598
600
}
599
601
600
602
return $ typeAndMethods ;
You can’t perform that action at this time.
0 commit comments