Skip to content
Permalink
Browse files

Check for not-callable return value

  • Loading branch information
muglug committed Nov 14, 2019
1 parent 0b1f83f commit 5fabf41c8e650aad12fabb51066e7337b948803a
@@ -2560,7 +2560,7 @@ public static function checkFunctionArgumentType(
$statements_analyzer->getFilePath()
);
if ($potential_method_id) {
if ($potential_method_id && $potential_method_id !== 'not-callable') {
$potential_method_ids[] = $potential_method_id;
}
} elseif ($input_type_part instanceof Type\Atomic\TLiteralString) {
@@ -1657,7 +1657,8 @@ public static function getCallableFromAtomic(
}
}
} elseif ($input_type_part instanceof ObjectLike) {
if ($method_id = self::getCallableMethodIdFromObjectLike($input_type_part)) {
$method_id = self::getCallableMethodIdFromObjectLike($input_type_part);
if ($method_id && $method_id !== 'not-callable') {
try {
$method_storage = $codebase->methods->getStorage($method_id);
list($method_fqcln) = \explode('::', $method_id);

0 comments on commit 5fabf41

Please sign in to comment.
You can’t perform that action at this time.