From ce30eb36a33fde17e3fb1f0ee9d6ed849d498ebe Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Mon, 16 Dec 2024 15:39:42 +0100 Subject: [PATCH] Implement __debugInfo() for Origin::class --- src/Origin.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Origin.php b/src/Origin.php index 4cd7a8e40..6857f3f19 100644 --- a/src/Origin.php +++ b/src/Origin.php @@ -17,6 +17,7 @@ public function __construct( protected string $mediaType = 'application/octet-stream', protected ?string $filePath = null ) { + // } /** @@ -85,4 +86,17 @@ public function fileExtension(): ?string { return empty($this->filePath) ? null : pathinfo($this->filePath, PATHINFO_EXTENSION); } + + /** + * Show debug info for the current image + * + * @return array + */ + public function __debugInfo(): array + { + return [ + 'mediaType' => $this->mediaType(), + 'filePath' => $this->filePath(), + ]; + } }