| @@ 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", |
|
| @@ 286-301 (lines=16) @@ | ||
| 283 | return $this->optionParamName; |
|
| 284 | } |
|
| 285 | ||
| 286 | protected function interpretDefaultValue($defaultValue) |
|
| 287 | { |
|
| 288 | $defaults = [ |
|
| 289 | 'null' => null, |
|
| 290 | 'true' => true, |
|
| 291 | 'false' => false, |
|
| 292 | "''" => '', |
|
| 293 | '[]' => [], |
|
| 294 | ]; |
|
| 295 | foreach ($defaults as $defaultName => $defaultTypedValue) { |
|
| 296 | if ($defaultValue == $defaultName) { |
|
| 297 | return $defaultTypedValue; |
|
| 298 | } |
|
| 299 | } |
|
| 300 | return $defaultValue; |
|
| 301 | } |
|
| 302 | ||
| 303 | /** |
|
| 304 | * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c', |
|