From 0350069e34f62816d0f638dbd7eed46d3f1986ce Mon Sep 17 00:00:00 2001 From: Kenta Usami Date: Mon, 6 Sep 2021 02:40:43 +0900 Subject: [PATCH] Fix native (built-in) type names Fix phpinspect-native-types to valid PHP built-in type names. See the code below for the types that can be described as valid return types: https://3v4l.org/fJgLA#v8.0.10 --- phpinspect.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpinspect.el b/phpinspect.el index 1ce308f..845bfd2 100644 --- a/phpinspect.el +++ b/phpinspect.el @@ -89,7 +89,9 @@ candidate. Candidates can be indexed functions and variables.") (message "Disabled phpinspect logging."))) (defconst phpinspect-native-types - '("int" "string" "bool" "boolean" "iterator" "array" "float" "void")) + ;; self, parent and resource are not valid type name. + ;; see https://www.php.net/manual/ja/language.types.declarations.php + '("array" "bool" "callable" "float" "int" "iterable" "mixed" "object" "string" "void")) (eval-when-compile (defun phpinspect--word-end-regex ()