| @@ 221-236 (lines=16) @@ | ||
| 218 | */ |
|
| 219 | abstract protected function processReturnTag($tag); |
|
| 220 | ||
| 221 | protected function interpretDefaultValue($defaultValue) |
|
| 222 | { |
|
| 223 | $defaults = [ |
|
| 224 | 'null' => null, |
|
| 225 | 'true' => true, |
|
| 226 | 'false' => false, |
|
| 227 | "''" => '', |
|
| 228 | '[]' => [], |
|
| 229 | ]; |
|
| 230 | foreach ($defaults as $defaultName => $defaultTypedValue) { |
|
| 231 | if ($defaultValue == $defaultName) { |
|
| 232 | return $defaultTypedValue; |
|
| 233 | } |
|
| 234 | } |
|
| 235 | return $defaultValue; |
|
| 236 | } |
|
| 237 | ||
| 238 | /** |
|
| 239 | * Given a docblock description in the form "$variable description", |
|
| @@ 273-288 (lines=16) @@ | ||
| 270 | return $this->optionParamName; |
|
| 271 | } |
|
| 272 | ||
| 273 | protected function interpretDefaultValue($defaultValue) |
|
| 274 | { |
|
| 275 | $defaults = [ |
|
| 276 | 'null' => null, |
|
| 277 | 'true' => true, |
|
| 278 | 'false' => false, |
|
| 279 | "''" => '', |
|
| 280 | '[]' => [], |
|
| 281 | ]; |
|
| 282 | foreach ($defaults as $defaultName => $defaultTypedValue) { |
|
| 283 | if ($defaultValue == $defaultName) { |
|
| 284 | return $defaultTypedValue; |
|
| 285 | } |
|
| 286 | } |
|
| 287 | return $defaultValue; |
|
| 288 | } |
|
| 289 | ||
| 290 | /** |
|
| 291 | * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c', |
|