<?php namespace Spatie\LaravelIgnition\Support; use Illuminate\Support\Arr; use Spatie\FlareClient\Report; class SentReports { /** @var array<int, Report> */ protected array $reports = []; public function add(Report $report): self { $this->reports[] = $report; return $this; } /** @return array<int, Report> */ public function all(): array { return $this->reports; } /** @return array<int, string> */ public function uuids(): array { return array_map(fn (Report $report) => $report->trackingUuid(), $this->reports); } /** @return array<int, string> */ public function urls(): array { return array_map(function (string $trackingUuid) { return "https://flareapp.io/tracked-occurrence/{$trackingUuid}"; }, $this->uuids()); } public function latestUuid(): ?string { return Arr::last($this->reports)?->trackingUuid(); } public function latestUrl(): ?string { return Arr::last($this->urls()); } public function clear(): void { $this->reports = []; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Composer | Folder | 0755 |
|
|
FlareLogHandler.php | File | 2.77 KB | 0644 |
|
LaravelDocumentationLinkFinder.php | File | 2.07 KB | 0644 |
|
LaravelVersion.php | File | 180 B | 0644 |
|
LivewireComponentParser.php | File | 2.97 KB | 0644 |
|
RunnableSolutionsGuard.php | File | 1.04 KB | 0644 |
|
SentReports.php | File | 1.12 KB | 0644 |
|
StringComparator.php | File | 1.53 KB | 0644 |
|