Upgrade framework
This commit is contained in:
1 parent
1648a5cd42
commit
4fcf6fffcc
10548 files changed
+693131
-466691
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\FlareClient;
|
||||
|
||||
use Spatie\Backtrace\Frame as SpatieFrame;
|
||||
|
||||
class Frame
|
||||
{
|
||||
protected SpatieFrame $frame;
|
||||
|
||||
public static function fromSpatieFrame(SpatieFrame $frame): self
|
||||
{
|
||||
return new self($frame);
|
||||
}
|
||||
|
||||
public function __construct(SpatieFrame $frame)
|
||||
{
|
||||
$this->frame = $frame;
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'file' => $this->frame->file,
|
||||
'line_number' => $this->frame->lineNumber,
|
||||
'method' => $this->frame->method,
|
||||
'class' => $this->frame->class,
|
||||
'code_snippet' => $this->frame->getSnippet(30),
|
||||
'application_frame' => $this->frame->applicationFrame,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user