mirror of
https://github.com/Karaka-Management/oms-Draw.git
synced 2026-01-11 14:28:40 +00:00
Implement tests
This commit is contained in:
parent
8f275c8e46
commit
1dbd73f17a
|
|
@ -39,7 +39,7 @@ class DrawImage implements ArrayableInterface, \JsonSerializable
|
|||
/**
|
||||
* Media object.
|
||||
*
|
||||
* @var Media
|
||||
* @var int|Media
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $media = null;
|
||||
|
|
@ -89,18 +89,10 @@ class DrawImage implements ArrayableInterface, \JsonSerializable
|
|||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'media' => $this->media->toArray(),
|
||||
'media' => \is_scalar($this->media) ? $this->media : $this->media->toArray(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return (string) \json_encode($this->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
@ -114,7 +106,7 @@ class DrawImage implements ArrayableInterface, \JsonSerializable
|
|||
*
|
||||
* @param Media $media Media object
|
||||
*
|
||||
* @return void
|
||||
* @return DrawImage
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user