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

Change NullReference issue to NullArgument when in method call

This commit is contained in:
Matt Brown 2016-12-14 12:54:34 -05:00
parent 6ee8d473a0
commit 1b8abc8f17
2 changed files with 8 additions and 1 deletions

View File

@ -19,6 +19,7 @@ use Psalm\Issue\InvalidScalarArgument;
use Psalm\Issue\InvalidScope;
use Psalm\Issue\MixedArgument;
use Psalm\Issue\MixedMethodCall;
use Psalm\Issue\NullArgument;
use Psalm\Issue\NullReference;
use Psalm\Issue\ParentNotFound;
use Psalm\Issue\TooFewArguments;
@ -1143,7 +1144,7 @@ class CallChecker
if ($input_type->isNullable() && !$param_type->isNullable() && $cased_method_id !== 'echo') {
if (IssueBuffer::accepts(
new NullReference(
new NullArgument(
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id . ' cannot be null, possibly ' .
'null value provided',
$code_location

View File

@ -0,0 +1,6 @@
<?php
namespace Psalm\Issue;
class NullArgument extends CodeError
{
}