Skip to content

Commit c716ba9

Browse files
authored
Merge pull request #795 from emacs-php/update/phpdoc-types
Update php-phpdoc-type-names to support PHPStan 2.0.4
2 parents 910391c + c2f416b commit c716ba9

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

lisp/php-mode.el

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,18 +1301,20 @@ for \\[find-tag] (which see)."
13011301

13021302
;; Font Lock
13031303
(defconst php-phpdoc-type-names
1304-
(list "string" "integer" "int" "boolean" "bool" "float"
1305-
"double" "object" "mixed" "array" "resource"
1306-
"void" "null" "false" "true" "self" "static"
1307-
"callable" "iterable" "number"
1308-
;; PHPStan and Psalm types
1309-
"array-key" "associative-array" "callable-array" "callable-object"
1310-
"callable-string" "class-string" "empty" "enum-string" "list"
1311-
"literal-string" "negative-int" "non-positive-int" "non-negative-int"
1312-
"never" "never-return" "never-returns" "no-return" "non-empty-array"
1313-
"non-empty-list" "non-empty-string" "non-falsy-string"
1314-
"numeric" "numeric-string" "positive-int" "scalar"
1315-
"trait-string" "truthy-string" "key-of" "value-of")
1304+
'(;; PHPStan and Psalm types
1305+
"__stringandstringable" "array" "array-key" "associative-array" "bool" "boolean"
1306+
"callable" "callable-array" "callable-object" "callable-string" "class-string"
1307+
"closed-resource" "double" "empty" "empty-scalar" "enum-string" "false" "float"
1308+
"int" "integer" "interface-string" "iterable" "list" "literal-string" "lowercase-string"
1309+
"mixed" "negative-int" "never" "never-return" "never-returns" "no-return" "non-empty-array"
1310+
"non-empty-list" "non-empty-literal-string" "non-empty-lowercase-string" "non-empty-mixed"
1311+
"non-empty-scalar" "non-empty-string" "non-empty-uppercase-string" "non-falsy-string"
1312+
"non-negative-int" "non-positive-int" "non-zero-int" "noreturn" "null" "number" "numeric"
1313+
"numeric-string" "object" "open-resource" "parent" "positive-int" "pure-callable"
1314+
"pure-closure" "resource" "scalar" "self" "static" "string" "trait-string" "true"
1315+
"truthy-string" "uppercase-string" "void"
1316+
;; PHPStan Generic Types
1317+
"key-of" "value-of" "int-mask-of" "int-mask" "__benevolent" "template-type" "new")
13161318
"A list of type and pseudotype names that can be used in PHPDoc.")
13171319

13181320
(make-obsolete-variable 'php-phpdoc-type-keywords 'php-phpdoc-type-names "1.24.2")

0 commit comments

Comments
 (0)