Commit f345e8d 1 parent 8a501b8 commit f345e8d Copy full SHA for f345e8d
File tree 1 file changed +9
-0
lines changed
packages/dev/src/PhpStan/Larastan
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ class Extension {
28
28
* of the original file).
29
29
*/
30
30
public static function dump (): void {
31
+ // Larastan?
32
+ if (!self ::hasLarastan ()) {
33
+ return ;
34
+ }
35
+
31
36
// Prepare
32
37
$ origin = self ::getLarastanPath ()->getFilePath ('extension.neon ' );
33
38
$ target = self ::getRootPath ()->getFilePath ('phpstan-larastan.neon ' );
@@ -141,6 +146,10 @@ private static function getRootPath(): DirectoryPath {
141
146
return new DirectoryPath ((string ) getcwd ());
142
147
}
143
148
149
+ private static function hasLarastan (): bool {
150
+ return InstalledVersions::isInstalled ('larastan/larastan ' );
151
+ }
152
+
144
153
private static function getLarastanPath (): DirectoryPath {
145
154
return self ::getPackagePath ('larastan/larastan ' );
146
155
}
You can’t perform that action at this time.
0 commit comments