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

Define with single argument should not trigger a notice

Fixes #3254
This commit is contained in:
Brown 2020-04-28 14:43:12 -04:00
parent d56c5c9782
commit a402d4598b
2 changed files with 6 additions and 1 deletions

View File

@ -1268,7 +1268,7 @@ class FunctionCallAnalyzer extends CallAnalyzer
$statements_analyzer->getAliases()
);
if ($fq_const_name !== null) {
if ($fq_const_name !== null && isset($stmt->args[1])) {
$second_arg = $stmt->args[1];
$was_in_call = $context->inside_call;
$context->inside_call = true;

View File

@ -0,0 +1,5 @@
<?php
namespace Psalm\Internal\Type\ParseTree;
interface NotExplicitlyTerminated {
}