File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -505,6 +505,6 @@ private function buildPattern(string $mask): string
505
505
'\- ' => '- ' ,
506
506
],
507
507
);
508
- return '# ' . $ anchor . $ pattern . '$#D ' . (defined ( ' PHP_WINDOWS_VERSION_BUILD ' ) ? 'i ' : '' );
508
+ return '# ' . $ anchor . $ pattern . '$#D ' . (Helpers:: isWindows ( ) ? 'i ' : '' );
509
509
}
510
510
}
Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ public static function falseToNull(mixed $value): mixed
52
52
}
53
53
54
54
55
+ /**
56
+ * Determines if the script is running on a Windows operating system.
57
+ */
58
+ public static function isWindows (): bool
59
+ {
60
+ return defined ('PHP_WINDOWS_VERSION_BUILD ' );
61
+ }
62
+
63
+
55
64
/**
56
65
* Returns value clamped to the inclusive range of min and max.
57
66
*/
You can’t perform that action at this time.
0 commit comments