Finished console Gii feature.

This commit is contained in:
Qiang Xue
2014-09-14 14:25:11 -04:00
parent 443779d693
commit 00cfe93b20
3 changed files with 7 additions and 5 deletions

View File

@@ -327,8 +327,11 @@ class HelpController extends Controller
*/
protected function formatOptionHelp($name, $required, $type, $defaultValue, $comment)
{
$doc = '';
$comment = trim($comment);
$type = trim($type);
if (strncmp($type, 'bool', 4) === 0) {
$type = 'boolean, 0 or 1';
}
if ($defaultValue !== null && !is_array($defaultValue)) {
if ($type === null) {
@@ -344,10 +347,7 @@ class HelpController extends Controller
$defaultValue = var_export($defaultValue, true);
}
$doc = "$type (defaults to " . $defaultValue . ")";
} elseif (trim($type) !== '') {
if (strncmp($type, 'bool', 4) === 0) {
$type = 'boolean, 0 or 1';
}
} else {
$doc = $type;
}