Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Spatie\LaravelIgnition\Recorders\DumpRecorder;
4
 
5
class Dump
6
{
7
    protected string $htmlDump;
8
 
9
    protected ?string $file;
10
 
11
    protected ?int $lineNumber;
12
 
13
    protected float $microtime;
14
 
15
    public function __construct(string $htmlDump, ?string $file, ?int $lineNumber, ?float $microtime = null)
16
    {
17
        $this->htmlDump = $htmlDump;
18
        $this->file = $file;
19
        $this->lineNumber = $lineNumber;
20
        $this->microtime = $microtime ?? microtime(true);
21
    }
22
 
23
    /** @return array<string, mixed> */
24
    public function toArray(): array
25
    {
26
        return [
27
            'html_dump' => $this->htmlDump,
28
            'file' => $this->file,
29
            'line_number' => $this->lineNumber,
30
            'microtime' => $this->microtime,
31
        ];
32
    }
33
}