1 | <?php |
||
13 | class Plateform |
||
|
|||
14 | { |
||
15 | const OS_UNKNOWN = 1; |
||
16 | const OS_WIN = 2; |
||
17 | const OS_LINUX = 3; |
||
18 | const OS_OSX = 4; |
||
19 | |||
20 | protected static $pharPath; |
||
21 | |||
22 | /** |
||
23 | * Running from Phar or not? |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | public static function isPhar() |
||
37 | |||
38 | /** |
||
39 | * Returns the full path on disk to the currently executing Phar archive. |
||
40 | */ |
||
41 | public static function getPharPath() |
||
49 | |||
50 | /** |
||
51 | * @return bool Whether the host machine is running a Windows OS |
||
52 | */ |
||
53 | public static function isWindows() |
||
57 | |||
58 | /** |
||
59 | * Opens a URL in the system default browser. |
||
60 | * |
||
61 | * @param string $url |
||
62 | */ |
||
63 | public static function openBrowser($url) |
||
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | */ |
||
81 | static public function getOS() { |
||
89 | } |
||
90 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.