mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-19 07:07:58 +08:00
Finished console Gii feature.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user