1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix tests to give more accurate locations

This commit is contained in:
Matthew Brown 2019-12-20 18:18:26 +00:00
parent 8bba5221b2
commit 3d03da271d
2 changed files with 3 additions and 3 deletions

View File

@ -998,7 +998,7 @@ class ClassAnalyzer extends ClassLikeAnalyzer
$parent_method_storage,
$this->fq_class_name,
$pseudo_method_storage->visibility ?: 0,
$pseudo_method_storage->location,
$storage->location ?: $pseudo_method_storage->location,
$storage->suppressed_issues,
true,
false

View File

@ -656,7 +656,7 @@ class MagicMethodAnnotationTest extends TestCase
/** @method D foo(string $s) */
class B extends A {}',
'error_message' => 'ImplementedReturnTypeMismatch - src/somefile.php:11:33',
'error_message' => 'ImplementedReturnTypeMismatch - src/somefile.php:12:27',
],
'magicMethodOverridesParentWithDifferentParamType' => [
'<?php
@ -671,7 +671,7 @@ class MagicMethodAnnotationTest extends TestCase
/** @method D foo(int $s) */
class B extends A {}',
'error_message' => 'ImplementedParamTypeMismatch - src/somefile.php:11:21',
'error_message' => 'ImplementedParamTypeMismatch - src/somefile.php:12:27',
],
'parseBadMethodAnnotation' => [
'<?php