Skip to content

Commit

Permalink
Merge branch 'master' of github.com:spatie/laravel-ray
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jan 10, 2021
2 parents 447f2b5 + 0c8d7c8 commit 5b94cfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OriginFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function getFrame(): ?Frame
$originFrame = $frames[$indexOfRay + $framesAbove] ?? null;
}

if (!$rayFrame) {
if (! $rayFrame) {
return null;
}

Expand Down Expand Up @@ -100,7 +100,7 @@ protected function findFrameForCollectionMacro(Collection $frames, int $indexOfF
protected function findFrameForQuery(Collection $frames): ?Frame
{
$indexOfLastDatabaseCall = $frames
->search(fn(Frame $frame) => Str::startsWith($frame->class, 'Illuminate\Database'));
->search(fn (Frame $frame) => Str::startsWith($frame->class, 'Illuminate\Database'));

return $frames[$indexOfLastDatabaseCall + 1] ?? null;
}
Expand All @@ -109,7 +109,7 @@ protected function findFrameForDump(Collection $frames): ?Frame
{
$indexOfDumpCall = $frames
->search(function (Frame $frame) {
if (!is_null($frame->class)) {
if (! is_null($frame->class)) {
return false;
}

Expand Down Expand Up @@ -168,15 +168,15 @@ protected function findFrameForLog(Collection $frames, int $indexOfLoggerCall):

protected function replaceCompiledViewPathWithOriginalViewPath(Frame $frame): Frame
{
if (!file_exists($frame->file)) {
if (! file_exists($frame->file)) {
return $frame;
}

$fileContents = file_get_contents($frame->file);

$originalViewPath = trim(Str::between($fileContents, '/**PATH', 'ENDPATH**/'));

if (!file_exists($originalViewPath)) {
if (! file_exists($originalViewPath)) {
return $frame;
}

Expand Down

0 comments on commit 5b94cfe

Please sign in to comment.