Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php namespace Comodojo\Daemon\Utils; |
||
21 | class Checks { |
||
22 | |||
23 | /** |
||
24 | * Check if script is running from command line |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | 1 | final public static function cli() { |
|
29 | |||
30 | 1 | return php_sapi_name() === 'cli'; |
|
31 | |||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Check if php interpreter supports pcntl_fork (required in multithread mode) |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | final public static function multithread() { |
||
42 | |||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Check if php interpreter supports pcntl signal handlers |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | 1 | final public static function signals() { |
|
53 | |||
54 | } |
||
57 |