[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phpinspect b1085763df 2/3: Use `defvar' instead of `def
From: |
ELPA Syncer |
Subject: |
[elpa] externals/phpinspect b1085763df 2/3: Use `defvar' instead of `defconst' for variables that are actually changed during runtime |
Date: |
Tue, 22 Aug 2023 15:58:18 -0400 (EDT) |
branch: externals/phpinspect
commit b1085763dfdff2d96cadeb0cb5f503ff5727aa7d
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>
Use `defvar' instead of `defconst' for variables that are actually changed
during runtime
---
phpinspect-type.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/phpinspect-type.el b/phpinspect-type.el
index 5c2291ffd0..2bd73fef27 100644
--- a/phpinspect-type.el
+++ b/phpinspect-type.el
@@ -64,10 +64,10 @@ that the collection is expected to contain")
;; see https://www.php.net/manual/ja/language.types.declarations.php
;;;
;; However, this list does not need to be valid, it just needs to contain the
- ;; list of type names that we should not attempt to resolve relatively.
+ ;; list of type names that we should not attempst to resolve relatively.
'("array" "bool" "callable" "float" "int" "iterable" "mixed" "object"
"string" "void" "self" "static" "this"))
-(defconst phpinspect-native-types
+(defvar phpinspect-native-types
(phpinspect--make-types (mapcar (lambda (name) (concat "\\" name))
phpinspect-native-typenames)))
@@ -75,11 +75,11 @@ that the collection is expected to contain")
(phpinspect--make-types '("\\array" "\\iterable" "\\SplObjectCollection"
"\\mixed"))
"FQNs of types that should be treated as collecitons when inferring types.")
-(defconst phpinspect--object-type (phpinspect--make-type :name "\\object"
:fully-qualified t))
-(defconst phpinspect--static-type (phpinspect--make-type :name "\\static"
:fully-qualified t))
-(defconst phpinspect--self-type (phpinspect--make-type :name "\\self"
:fully-qualified t))
-(defconst phpinspect--this-type (phpinspect--make-type :name "\\this"
:fully-qualified t))
-(defconst phpinspect--null-type (phpinspect--make-type :name "\\null"
:fully-qualified t))
+(defvar phpinspect--object-type (phpinspect--make-type :name "\\object"
:fully-qualified t))
+(defvar phpinspect--static-type (phpinspect--make-type :name "\\static"
:fully-qualified t))
+(defvar phpinspect--self-type (phpinspect--make-type :name "\\self"
:fully-qualified t))
+(defvar phpinspect--this-type (phpinspect--make-type :name "\\this"
:fully-qualified t))
+(defvar phpinspect--null-type (phpinspect--make-type :name "\\null"
:fully-qualified t))
(defun phpinspect-define-standard-types ()
(setq phpinspect-native-types