@@ -254,8 +254,8 @@ |
||
254 | 254 | |
255 | 255 | protected function convertName($camel) |
256 | 256 | { |
257 | - $splitter="-"; |
|
258 | - $camel=preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)); |
|
257 | + $splitter = "-"; |
|
258 | + $camel = preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)); |
|
259 | 259 | $camel = preg_replace("/$splitter/", ':', $camel, 1); |
260 | 260 | return strtolower($camel); |
261 | 261 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * @var boolean |
21 | 21 | * @var string |
22 | - */ |
|
22 | + */ |
|
23 | 23 | protected $docBlockIsParsed; |
24 | 24 | |
25 | 25 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | /** |
96 | 96 | * Return the list of refleaction parameters. |
97 | 97 | * |
98 | - * @return ReflectionParameter[] |
|
98 | + * @return \ReflectionParameter[] |
|
99 | 99 | */ |
100 | 100 | public function getParameters() |
101 | 101 | { |
@@ -497,6 +497,7 @@ discard block |
||
497 | 497 | * instance, we will allow the @option or @default tag to |
498 | 498 | * reference the option only by name (e.g. 'silent' or 's' |
499 | 499 | * instead of 'silent|s'). |
500 | + * @return string |
|
500 | 501 | */ |
501 | 502 | public function findMatchingOption($optionName) |
502 | 503 | { |
@@ -529,6 +530,8 @@ discard block |
||
529 | 530 | /** |
530 | 531 | * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c', |
531 | 532 | * convert the data into the last of these forms. |
533 | + * @param string $text |
|
534 | + * @return string |
|
532 | 535 | */ |
533 | 536 | protected static function convertListToCommaSeparated($text) |
534 | 537 | { |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | return $this->joinParts( |
268 | 268 | '\\', |
269 | 269 | $namespaceParts, |
270 | - function ($item) { |
|
270 | + function($item) { |
|
271 | 271 | return !is_numeric($item) && !empty($item); |
272 | 272 | } |
273 | 273 | ); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | return $this->joinParts( |
287 | 287 | '/', |
288 | 288 | $pathParts, |
289 | - function ($item) { |
|
289 | + function($item) { |
|
290 | 290 | return !empty($item); |
291 | 291 | } |
292 | 292 | ); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | // set or setup. |
68 | 68 | $commandMethodNames = array_filter( |
69 | 69 | get_class_methods($classNameOrInstance) ?: [], |
70 | - function ($m) { |
|
70 | + function($m) { |
|
71 | 71 | return !preg_match('#^(_|get[A-Z]|set[A-Z])#', $m); |
72 | 72 | } |
73 | 73 | ); |
@@ -24,6 +24,9 @@ discard block |
||
24 | 24 | */ |
25 | 25 | protected $defaultDefault; |
26 | 26 | |
27 | + /** |
|
28 | + * @param boolean $defaultDefault |
|
29 | + */ |
|
27 | 30 | public function __construct($values, $defaultDefault = null) |
28 | 31 | { |
29 | 32 | $this->values = $values; |
@@ -45,13 +48,17 @@ discard block |
||
45 | 48 | * Check to see whether the speicifed key exists in the collection. |
46 | 49 | * |
47 | 50 | * @param type $key |
48 | - * @return type |
|
51 | + * @return boolean |
|
49 | 52 | */ |
50 | 53 | public function exists($key) |
51 | 54 | { |
52 | 55 | return array_key_exists($key, $this->values); |
53 | 56 | } |
54 | 57 | |
58 | + /** |
|
59 | + * @param string $key |
|
60 | + * @param string $defaultValue |
|
61 | + */ |
|
55 | 62 | public function setDefaultValue($key, $defaultValue) |
56 | 63 | { |
57 | 64 | $this->values[$key] = $defaultValue; |