Skip to content

Commit

Permalink
fix: non user defined functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jun 8, 2024
1 parent 39f4865 commit 774ee84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Objects/FunctionDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public static function make(string $path): self
{
$description = new self();

$description->path = (new ReflectionFunction($path))->getFileName();
try {
$description->path = (new ReflectionFunction($path))->getFileName();
} catch (\Throwable) {
$description->path = $path;
}

/** @var class-string<mixed> $path */
$description->name = $path;
Expand Down

0 comments on commit 774ee84

Please sign in to comment.