| Total Complexity | 10 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Environment |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Get current operation system full name |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | public static function osName() |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Get working API type (apache2handler, cgi, fcgi, etc) |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public static function phpSAPI() |
||
| 25 | { |
||
| 26 | return php_sapi_name(); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get current php version and small build info |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public static function phpVersion() |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get load average in percents. |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public static function loadAverage() |
||
| 72 |
If you suppress an error, we recommend checking for the error condition explicitly: