Total Complexity | 2 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | final class OS |
||
11 | { |
||
12 | /** |
||
13 | * Mac OS |
||
14 | * |
||
15 | * @const string |
||
16 | */ |
||
17 | public const MAC_OS = 'dar'; |
||
18 | |||
19 | /** |
||
20 | * Linux |
||
21 | * |
||
22 | * @const string |
||
23 | */ |
||
24 | public const LINUX = 'lin'; |
||
25 | |||
26 | /** |
||
27 | * Linux |
||
28 | * |
||
29 | * @const string |
||
30 | */ |
||
31 | public const WIN = 'win'; |
||
32 | |||
33 | /** |
||
34 | * Cygwin |
||
35 | * |
||
36 | * @const string |
||
37 | */ |
||
38 | public const CYGWIN = 'cyg'; |
||
39 | |||
40 | /** |
||
41 | * Returns true if current OS in types |
||
42 | * |
||
43 | * @param string ...$types |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | public static function is(string ...$types): bool |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Current OS |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public static function current(): string |
||
62 |