Skip to content

Commit 5bef69e

Browse files
committed
Refactor: Use or instead not-null
This is a code of the same meaning, but it was certainly verbose before. melpa/melpa#5427
1 parent 5691ed5 commit 5bef69e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

phpstan.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ If neither `phpstan-replace-path-prefix' nor executable docker is set,
169169
it returns the value of `SOURCE' as it is."
170170
(let ((root-directory (expand-file-name (php-project-get-root-dir)))
171171
(prefix
172-
(cond
173-
((not (null phpstan-replace-path-prefix)) phpstan-replace-path-prefix)
174-
((eq 'docker phpstan-executable) "/app")
175-
((and (consp phpstan-executable)
176-
(string= "docker" (car phpstan-executable))) "/app"))))
172+
(or phpstan-replace-path-prefix
173+
(cond
174+
((eq 'docker phpstan-executable) "/app")
175+
((and (consp phpstan-executable)
176+
(string= "docker" (car phpstan-executable))) "/app")))))
177177
(if prefix
178178
(expand-file-name
179179
(replace-regexp-in-string (concat "\\`" (regexp-quote root-directory))

0 commit comments

Comments
 (0)