Skip to content
Permalink
Browse files

Fix #1950 - improve class_parents return

  • Loading branch information...
muglug committed Jul 17, 2019
1 parent eb1cd2e commit 210a0fc98d0d905394ff23e2ee2be6a1090cbac6
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Psalm/Internal/CallMap.php
@@ -1026,7 +1026,7 @@
'class_alias' => ['bool', 'user_class_name'=>'string', 'alias_name'=>'string', 'autoload='=>'bool'],
'class_exists' => ['bool', 'classname'=>'string', 'autoload='=>'bool'],
'class_implements' => ['array<string,string>|false', 'what'=>'object|string', 'autoload='=>'bool'],
'class_parents' => ['array<string,string>|false', 'instance'=>'object|string', 'autoload='=>'bool'],
'class_parents' => ['array<string, class-string>|false', 'instance'=>'object|string', 'autoload='=>'bool'],

This comment has been minimized.

Copy link
@ShiraNai7

ShiraNai7 Jul 18, 2019

Contributor

The type should probably be array<class-string, class-string>|false, since class_parents() returns the class names in both keys and values for some reason.

print_r(class_parents('BadMethodCallException'));
Array
(
    [BadFunctionCallException] => BadFunctionCallException
    [LogicException] => LogicException
    [Exception] => Exception
)
'class_uses' => ['array<string,string>|false', 'what'=>'object|string', 'autoload='=>'bool'],
'classkit_import' => ['array', 'filename'=>'string'],
'classkit_method_add' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'args'=>'string', 'code'=>'string', 'flags='=>'int'],

0 comments on commit 210a0fc

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