Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 4, 2024
1 parent 5b14972 commit 768ffc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ function laravel_or_fail($app, ?string $caller = null): Application

if (\is_null($caller)) {
$caller = transform(debug_backtrace()[1], function ($debug) {
/** @phpstan-ignore isset.offset */
if (isset($debug['class']) && isset($debug['function'])) {
return \sprintf('%s::%s', $debug['class'], $debug['function']);
}
Expand All @@ -482,5 +483,5 @@ function laravel_or_fail($app, ?string $caller = null): Application
});
}

throw Exceptions\ApplicationNotAvailableException::make($caller ?? debug_backtrace()[1]['function']);
throw Exceptions\ApplicationNotAvailableException::make($caller);
}

0 comments on commit 768ffc8

Please sign in to comment.