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 117117 (and (eq 'root (car v)) (stringp (cdr v)))
118118 (null v) (stringp v)))))
119119
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+
120138;;;### autoload
121139(progn
122140 (defvar-local phpstan-level nil
197215 if dir
198216 return (expand-file-name name dir))))))
199217
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+
200226(defun phpstan-normalize-path (source-original &optional source )
201227 " Return normalized source file path to pass by `SOURCE-ORIGINAL' OR `SOURCE' .
202228
You can’t perform that action at this time.
0 commit comments