1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix psalm --alter (#1719)

This commit is contained in:
Barney Laurance 2019-06-01 14:22:39 +01:00 committed by Matthew Brown
parent 169121b6fd
commit e0486ba757

View File

@ -39,6 +39,11 @@ array_map(
if (substr($arg, 0, 2) === '--' && $arg !== '--') {
$arg_name = preg_replace('/=.*$/', '', substr($arg, 2));
if ($arg_name === 'alter') {
// valid option for psalm, ignored by psalter
return;
}
if (!in_array($arg_name, $valid_long_options)
&& !in_array($arg_name . ':', $valid_long_options)
&& !in_array($arg_name . '::', $valid_long_options)