Browse Source

Fixes #4288: added a hint on how to specify console boolean values to the output of help

tags/2.0.0-rc
Alexander Makarov 10 years ago
parent
commit
d471f0ba91
  1. 6
      framework/console/controllers/HelpController.php

6
framework/console/controllers/HelpController.php

@ -329,8 +329,14 @@ class HelpController extends Controller
// show as integer to avoid confusion
$defaultValue = (int) $defaultValue;
}
if ($type === 'boolean') {
$type = 'boolean, 0 or 1';
}
$doc = "$type (defaults to " . var_export($defaultValue, true) . ")";
} elseif (trim($type) !== '') {
if ($type === 'boolean') {
$type = 'boolean, 0 or 1';
}
$doc = $type;
}

Loading…
Cancel
Save