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:
parent
6ee8d473a0
commit
1b8abc8f17
@ -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
|
||||
|
6
src/Psalm/Issue/NullArgument.php
Normal file
6
src/Psalm/Issue/NullArgument.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace Psalm\Issue;
|
||||
|
||||
class NullArgument extends CodeError
|
||||
{
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user