| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class Util |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * List of valid action types |
||
| 22 | * |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private static $validTypes = ['php' => true, 'cli' => true]; |
||
| 26 | |||
| 27 | |||
| 28 | /** |
||
| 29 | * Check the validity of a exec type |
||
| 30 | * |
||
| 31 | * @param string $type |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | 1 | public static function isTypeValid(string $type) : bool |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Return action type |
||
| 41 | * |
||
| 42 | * @param string $action |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 18 | public static function getExecType(string $action) : string |
|
| 50 |