mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-29 17:18:39 +00:00
Test fixes
This commit is contained in:
parent
f3cf170d88
commit
a5b9f4fdf7
|
|
@ -16,7 +16,6 @@
|
|||
namespace Modules\Media\Models;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Media class.
|
||||
*
|
||||
|
|
@ -39,6 +38,9 @@ class Collection extends Media
|
|||
*/
|
||||
private $sources = [];
|
||||
|
||||
protected $extension = 'collection';
|
||||
protected $versioned = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
|
@ -91,4 +93,12 @@ class Collection extends Media
|
|||
{
|
||||
return $this->sources;
|
||||
}
|
||||
|
||||
public function setExtension(string $extension)
|
||||
{
|
||||
}
|
||||
|
||||
public function setVersioned(bool $versioned)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,19 +139,6 @@ class Media
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id Id
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setId(int $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*
|
||||
|
|
@ -171,7 +158,7 @@ class Media
|
|||
*/
|
||||
public function getCreatedAt() : \DateTime
|
||||
{
|
||||
return $this->createdAt;
|
||||
return $this->createdAt ?? new \DateTime('now');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -229,6 +216,17 @@ class Media
|
|||
return $this->size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function isVersioned() : bool
|
||||
{
|
||||
return $this->versioned;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $createdBy Creator
|
||||
*
|
||||
|
|
@ -332,15 +330,4 @@ class Media
|
|||
{
|
||||
$this->versioned = $versioned;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getVersioned() : bool
|
||||
{
|
||||
return $this->versioned;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user