mirror of
https://github.com/danog/psalm-plugin-phpunit.git
synced 2024-11-27 04:24:50 +01:00
Cast the return method for unknown method
The method is not present (and not called) for older versions of php-parser, but Psalm still complains about it.
This commit is contained in:
parent
880f56dfe3
commit
5590278379
@ -538,7 +538,7 @@ class TestCaseHandler implements
|
||||
private static function getCommentLine(Doc $docblock): int
|
||||
{
|
||||
if (method_exists($docblock, 'getStartLine')) {
|
||||
return $docblock->getStartLine();
|
||||
return (int) $docblock->getStartLine();
|
||||
}
|
||||
/** @psalm-suppress DeprecatedMethod */
|
||||
return $docblock->getLine();
|
||||
|
Loading…
Reference in New Issue
Block a user