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:
parent
77da6ca5c4
commit
86fe195a15
@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user