mirror of
https://github.com/Karaka-Management/oms-Draw.git
synced 2026-02-15 14:48: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.
|
* Media object.
|
||||||
*
|
*
|
||||||
* @var Media
|
* @var int|Media
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $media = null;
|
private $media = null;
|
||||||
|
|
@ -89,18 +89,10 @@ class DrawImage implements ArrayableInterface, \JsonSerializable
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
@ -114,7 +106,7 @@ class DrawImage implements ArrayableInterface, \JsonSerializable
|
||||||
*
|
*
|
||||||
* @param Media $media Media object
|
* @param Media $media Media object
|
||||||
*
|
*
|
||||||
* @return void
|
* @return DrawImage
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user