Skip to content

Commit

Permalink
PhpFunctionReflection - do not return nonexistent filename
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 18, 2020
1 parent 50aff6d commit e496d71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Reflection/Php/PhpFunctionReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ public function getName(): string
*/
public function getFileName()
{
if ($this->filename === false) {
return false;
}

if (!file_exists($this->filename)) {
return false;
}

return $this->filename;
}

Expand Down

0 comments on commit e496d71

Please sign in to comment.