Skip to content

Commit 574a2d1

Browse files
committed
added Helpers::IsWindows
1 parent f695262 commit 574a2d1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: src/Utils/Finder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,6 @@ private function buildPattern(string $mask): string
505505
'\-' => '-',
506506
],
507507
);
508-
return '#' . $anchor . $pattern . '$#D' . (defined('PHP_WINDOWS_VERSION_BUILD') ? 'i' : '');
508+
return '#' . $anchor . $pattern . '$#D' . (Helpers::IsWindows ? 'i' : '');
509509
}
510510
}

Diff for: src/Utils/Helpers.php

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
class Helpers
1616
{
17+
public const IsWindows = PHP_OS_FAMILY === 'Windows';
18+
19+
1720
/**
1821
* Executes a callback and returns the captured output as a string.
1922
*/

0 commit comments

Comments
 (0)