branch: externals/phpinspect
commit 0350069e34f62816d0f638dbd7eed46d3f1986ce
Author: Kenta Usami <[email protected]>
Commit: Hugo Thunnissen <[email protected]>
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 1ce308f667..845bfd2f95 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 ()