File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 117
117
(and (eq 'root (car v)) (stringp (cdr v)))
118
118
(null v) (stringp v)))))
119
119
120
+ ;;;### autoload
121
+ (progn
122
+ (defvar-local phpstan-autoload-file nil
123
+ " Path to autoload file for PHPStan.
124
+
125
+ STRING
126
+ Path to `phpstan' autoload file.
127
+
128
+ `(root . STRING)'
129
+ Relative path to `phpstan' configuration file from project root directory.
130
+
131
+ NIL
132
+ If `phpstan-enable-on-no-config-file' , search \" vendor/autoload.php\" in (phpstan-get-working-dir)." )
133
+ (put 'phpstan-autoload-file 'safe-local-variable
134
+ #' (lambda (v ) (if (consp v)
135
+ (and (eq 'root (car v)) (stringp (cdr v)))
136
+ (null v) (stringp v)))))
137
+
120
138
;;;### autoload
121
139
(progn
122
140
(defvar-local phpstan-level nil
197
215
if dir
198
216
return (expand-file-name name dir))))))
199
217
218
+ (defun phpstan-get-autoload-file ()
219
+ " Return path to autoload file or NIL."
220
+ (when phpstan-autoload-file
221
+ (if (and (consp phpstan-autoload-file)
222
+ (eq 'root (car phpstan-autoload-file)))
223
+ (expand-file-name (cdr phpstan-autoload-file) (php-project-get-root-dir))
224
+ phpstan-autoload-file)))
225
+
200
226
(defun phpstan-normalize-path (source-original &optional source )
201
227
" Return normalized source file path to pass by `SOURCE-ORIGINAL' OR `SOURCE' .
202
228
You can’t perform that action at this time.
0 commit comments