Skip to content

Commit

Permalink
try other setting for argv
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Sep 19, 2022
1 parent 26faa4b commit 3ec15f6
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -29,6 +29,7 @@
use Psalm\Type\Atomic\TNonEmptyArray;
use Psalm\Type\Atomic\TNonEmptyList;
use Psalm\Type\Atomic\TNonEmptyString;
use Psalm\Type\Atomic\TNull;
use Psalm\Type\Atomic\TString;
use Psalm\Type\TaintKindGroup;
use Psalm\Type\Union;
Expand Down Expand Up @@ -542,9 +543,8 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_
// only in CLI, null otherwise
$argv_nullable = new Union([
new TNonEmptyList(Type::getString()),
// new TNull()
new TNull()
]);
$argv_nullable->possibly_undefined = true;
$argv_nullable->ignore_nullable_issues = true;
return $argv_nullable;
}
Expand All @@ -553,9 +553,8 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_
// only in CLI, null otherwise
$argc_nullable = new Union([
new TIntRange(1, null),
// new TNull()
new TNull()
]);
$argc_nullable->possibly_undefined = true;
$argc_nullable->ignore_nullable_issues = true;
return $argc_nullable;
}
Expand Down

0 comments on commit 3ec15f6

Please sign in to comment.