mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add another test
This commit is contained in:
parent
eeb2858b30
commit
c1bcd3ce12
@ -511,6 +511,19 @@ class MethodCallTest extends TestCase
|
||||
$date = new DateTime(null, new DateTimeZone("Pacific/Nauru"));
|
||||
echo $date->format("Y-m-d H:i:sP") . "\n";'
|
||||
],
|
||||
'noCrashOnGetClassMethodCallWithNull' => [
|
||||
'<?php
|
||||
class User {
|
||||
/**
|
||||
* @psalm-suppress NullArgument
|
||||
*/
|
||||
public function give(): void{
|
||||
$model = null;
|
||||
$class = \get_class($model);
|
||||
$class::foo();
|
||||
}
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user