Skip to content

Commit

Permalink
ReturnTypeWillChange attribute class is always defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 26, 2021
1 parent fc57cd6 commit c721459
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"nette/utils": "^3.1.3",
"nikic/php-parser": "4.13.0",
"ondram/ci-detector": "^3.4.0",
"ondrejmirtes/better-reflection": "4.3.72",
"ondrejmirtes/better-reflection": "4.3.73",
"phpstan/php-8-stubs": "^0.1.23",
"phpstan/phpdoc-parser": "^1.2.0",
"react/child-process": "^0.6.4",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function locateIdentifier(Reflector $reflector, Identifier $identifier):
}

$reflection = new \ReflectionClass($className);
if ($reflection->getName() === 'ReturnTypeWillChange') {
return $this->sourceLocator->locateIdentifier($reflector, $identifier);
}
if ($reflection->getFileName() === false) {
return $this->sourceLocator->locateIdentifier($reflector, $identifier);
}
Expand Down

0 comments on commit c721459

Please sign in to comment.