1
0
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:
Matthew Brown 2020-02-27 08:59:43 -05:00
parent eeb2858b30
commit c1bcd3ce12

View File

@ -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();
}
}',
],
];
}