Conditions | 6 |
Paths | 16 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
30 | 12 | public function usageInfo() |
|
31 | { |
||
32 | 12 | $arg = array(); |
|
33 | 12 | if ($this->prefix) { |
|
34 | 8 | $arg[] = '-'.$this->prefix.' '.$this->name; |
|
35 | } |
||
36 | 12 | if ($this->longPrefix) { |
|
37 | 8 | $arg[] = '--'.$this->longPrefix.' '.$this->name; |
|
38 | } |
||
39 | 12 | if ($this->defaultValue) { |
|
40 | 4 | $arg[] = '(default: '.$this->defaultValue.')'; |
|
41 | } |
||
42 | 12 | if (!$this->prefix && !$this->longPrefix) { |
|
43 | 2 | $arg[] = $this->name; |
|
44 | } |
||
45 | 12 | $arg = implode(', ', $arg); |
|
46 | 12 | return $arg; |
|
47 | } |
||
48 | |||
61 | } |