1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-16 19:58:14 +01:00

Implement __debugInfo() for Origin::class

This commit is contained in:
Oliver Vogel 2024-12-16 15:39:42 +01:00
parent 77da6ca5c4
commit 86fe195a15
No known key found for this signature in database

View File

@ -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<string, null|string>
*/
public function __debugInfo(): array
{
return [
'mediaType' => $this->mediaType(),
'filePath' => $this->filePath(),
];
}
}