| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __construct() |
||
| 25 | { |
||
| 26 | if ($this->get('help') || $this->get('h')) { |
||
| 27 | $desc = <<<FLL |
||
| 28 | Description |
||
| 29 | Params: |
||
| 30 | -c: <string> 指定要实例化的类名。默认调用FreeNom类 |
||
| 31 | -m: <string> 指定要调用的方法名(不支持静态方法)。默认调用handle方法 |
||
| 32 | -h: 显示说明 |
||
| 33 | |||
| 34 | Example: |
||
| 35 | $ php run -c=FreeNom -m=handle |
||
| 36 | |||
| 37 | FLL; |
||
| 38 | echo $desc; |
||
| 39 | exit(0); |
||
|
|
|||
| 40 | } |
||
| 89 | } |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.