protected function showUsage($type = 'usage', $halt = true)
{
$usage_simple = <<<'EOT'
Usage: phpmig [options] <file>...
phpmig -l | --list
EOT;
$usage_full = <<<EOT
PHP Migration - A static analyzer for PHP version migration
{$usage_simple}
Options:
-l, --list List all check sets
-q, --quite Only output identified spots, ignore all uncertain
-s, --set=NAME The name of check set to use [default: to56]
-d, --dump Dump abstract syntax tree
-v, --verbose
-h, --help Show this screen
--version Show version
EOT;
$usage_dev = <<<'EOT'
Development:
--export-posbit <doc> Export built-in function posbit list
--pack Generate an executable phar file
EOT;
if ($type == 'usage') {
echo $usage_simple . "\n";
} elseif ($this->devmode) {
echo $usage_full . "\n" . $usage_dev . "\n";
} else {
echo $usage_full . "\n";
}
if ($halt) {
exit(0);
}
}