From 86fe195a15a7094156b46df85b4e7cc172deefc3 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 4cd7a8e4..6857f3f1 100644 --- a/src/Origin.php +++ b/src/Origin.php @@ -17,6 +17,7 @@ class Origin protected string $mediaType = 'application/octet-stream', protected ?string $filePath = null ) { + // } /** @@ -85,4 +86,17 @@ class Origin { 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(), + ]; + } }