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:
Bruce Weirdan 2020-05-04 07:24:35 +03:00
parent 880f56dfe3
commit 5590278379
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -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();