1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix #66 -m flag

This commit is contained in:
Matthew Brown 2017-01-16 19:44:31 -05:00
parent 317eab8730
commit 991d002d3f

View File

@ -20,7 +20,7 @@ ini_set('xdebug.max_nesting_level', 512);
// get options from command line
$options = getopt(
'f:m:hc:',
'f:mhc:',
[
'help', 'debug', 'config:', 'monochrome', 'show-info:', 'diff',
'file:', 'self-check', 'update-docblocks', 'output-format:',
@ -39,6 +39,10 @@ if (isset($options['config'])) {
$options['c'] = $options['config'];
}
if (isset($options['c']) && is_array($options['c'])) {
die('Too many config files provided' . PHP_EOL);
}
if (array_key_exists('h', $options)) {
echo <<< HELP
Usage:
@ -89,7 +93,9 @@ if ($input_paths) {
}
if ($input_path[0] === '-' && strlen($input_path) === 2) {
$i++;
if ($input_path[1] === 'c' || $input_path[1] === 'f') {
$i++;
}
continue;
}