1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Merge pull request #9025 from kkmuffme/fix-method-phpdoc-errors-reported-for-stubs-instead-of-files

fixes return type issues of methods reported for the wrong file
This commit is contained in:
orklah 2022-12-29 20:13:38 +01:00 committed by GitHub
commit 2efa6aefac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -920,6 +920,12 @@ class Methods
$storage = $this->getStorage($method_id);
// if function exists in stubs and in analyzed code
// use the return type location of the analyzed code instead of the stubbed location
if ($storage->stubbed) {
return null;
}
if (!$storage->return_type_location) {
$overridden_method_ids = $this->getOverriddenMethodIds($method_id);