File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 2424use PHPStan \BetterReflection \SourceLocator \Type \SourceLocator ;
2525use PHPStan \Command \CommandHelper ;
2626use PHPStan \File \FileHelper ;
27- use PHPStan \File \FilesystemHelper ;
2827use PHPStan \Node \Printer \Printer ;
2928use PHPStan \Php \PhpVersion ;
3029use PHPStan \Reflection \PhpVersionStaticAccessor ;
4847use function spl_object_id ;
4948use function sprintf ;
5049use function str_ends_with ;
51- use function strtoupper ;
5250use function substr ;
5351
5452/**
@@ -192,8 +190,6 @@ public static function postInitializeContainer(Container $container): void
192190 $ container ->getService ('typeSpecifier ' );
193191
194192 BleedingEdgeToggle::setBleedingEdge ($ container ->getParameter ('featureToggles ' )['bleedingEdge ' ]);
195- // filename intentional in wrong case
196- FilesystemHelper::setIsCaseSensitive (is_file (__DIR__ . '/ ' . strtoupper (__FILE__ )));
197193 }
198194
199195 public function getCurrentWorkingDirectory (): string
Original file line number Diff line number Diff line change 22
33namespace PHPStan \File ;
44
5- use PHPStan \ShouldNotHappenException ;
5+ use function is_file ;
6+ use function strtoupper ;
67
78final class FilesystemHelper
89{
@@ -12,14 +13,9 @@ final class FilesystemHelper
1213 public static function isCaseSensitive (): bool
1314 {
1415 if (self ::$ isCaseSensitive === null ) {
15- throw new ShouldNotHappenException ( );
16+ self :: $ isCaseSensitive = is_file ( __DIR__ . ' / ' . strtoupper ( __FILE__ ) );
1617 }
1718 return self ::$ isCaseSensitive ;
1819 }
1920
20- public static function setIsCaseSensitive (bool $ isCaseSensitive ): void
21- {
22- self ::$ isCaseSensitive = $ isCaseSensitive ;
23- }
24-
2521}
You can’t perform that action at this time.
0 commit comments