1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix tests

This commit is contained in:
Daniil Gentili 2021-09-21 12:21:01 +02:00
parent 7e0b489efe
commit ba2c2bdaa2
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ class FunctionLikeDocblockParser
$info->if_this_is = [
'type' => str_replace("\n", '', $line_parts[0]),
'line_number' => $comment->getStartLine() + substr_count($comment_text, "\n", 0, $offset),
'line_number' => $comment->getStartLine() + substr_count($comment_text, "\n", 0, $offset - $comment->getStartFilePos()),
];
}
}

View File

@ -9,7 +9,7 @@ class IfThisIsTest extends TestCase
/**
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
*/
public function providerValidCodeParse()
public function providerValidCodeParse(): iterable
{
return [
'worksAfterConvert' => [
@ -114,7 +114,7 @@ class IfThisIsTest extends TestCase
/**
* @return array<string, array{0: string, error_message: string}>
*/
public function providerInvalidCodeParse()
public function providerInvalidCodeParse(): iterable
{
return [
'blocksWithoutConvert' => [