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
458458
459459 public function isCallable (): TrinaryLogic
460460 {
461- $ typeAndMethods = $ this ->findTypeAndMethodNames ();
461+ $ typeAndMethods = $ this ->findTypeAndMethodNames (false );
462462 if ($ typeAndMethods === []) {
463463 return TrinaryLogic::createNo ();
464464 }
@@ -561,7 +561,7 @@ public function findTypeAndMethodName(): ?ConstantArrayTypeAndMethod
561561 }
562562
563563 /** @return ConstantArrayTypeAndMethod[] */
564- public function findTypeAndMethodNames (): array
564+ public function findTypeAndMethodNames (bool $ atLeastMaybe = true ): array
565565 {
566566 $ callableArray = $ this ->getClassOrObjectAndMethods ();
567567 if ($ callableArray === []) {
@@ -594,7 +594,9 @@ public function findTypeAndMethodNames(): array
594594 }
595595 }
596596
597- $ typeAndMethods [] = ConstantArrayTypeAndMethod::createConcrete ($ type , $ method ->getValue (), $ has );
597+ if (!$ atLeastMaybe || !$ has ->no ()) {
598+ $ typeAndMethods [] = ConstantArrayTypeAndMethod::createConcrete ($ type , $ method ->getValue (), $ has );
599+ }
598600 }
599601
600602 return $ typeAndMethods ;
You can’t perform that action at this time.
0 commit comments