mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
Fix minor bugs for full inspections
This commit is contained in:
parent
92428821fc
commit
cec9895c93
|
|
@ -16,8 +16,8 @@ namespace Modules\Tasks\Admin;
|
|||
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\DataStorage\Database\Schema\Builder;
|
||||
use phpOMS\Module\InfoManager;
|
||||
use phpOMS\Module\UninstallAbstract;
|
||||
use phpOMS\Module\InfoManager;
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ declare(strict_types=1);
|
|||
namespace Modules\Tasks\Admin;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\InfoManager;
|
||||
use phpOMS\Module\UpdateAbstract;
|
||||
use phpOMS\System\File\Directory;
|
||||
use phpOMS\Module\InfoManager;
|
||||
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ class Task implements \JsonSerializable
|
|||
public function setStatus(int $status)
|
||||
{
|
||||
if(!TaskStatus::isValidValue($status)) {
|
||||
throw new InvalidEnumValue($status);
|
||||
throw new InvalidEnumValue((string) $status);
|
||||
}
|
||||
|
||||
$this->status = $status;
|
||||
|
|
@ -377,7 +377,7 @@ class Task implements \JsonSerializable
|
|||
public function setPriority(int $priority)
|
||||
{
|
||||
if(!TaskStatus::isValidValue($priority)) {
|
||||
throw new InvalidEnumValue($priority);
|
||||
throw new InvalidEnumValue((string) $priority);
|
||||
}
|
||||
|
||||
$this->priority = $priority;
|
||||
|
|
@ -486,17 +486,17 @@ class Task implements \JsonSerializable
|
|||
return $this->schedule;
|
||||
}
|
||||
|
||||
private function toArray() : array
|
||||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'createdBy' => $this->createdBy,
|
||||
'createdAt' => $this->createdAt,
|
||||
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
||||
'title' => $this->title,
|
||||
'description' => $this->description,
|
||||
'status' => $this->status,
|
||||
'type' => $this->type,
|
||||
'type' => $this->type,
|
||||
'priority' => $this->priority,
|
||||
'due' => $this->due->format('Y-m-d H:i:s'),
|
||||
'done' => (!isset($this->done) ? null : $this->done->format('Y-m-d H:i:s')),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ class TaskElement implements \JsonSerializable
|
|||
public function setStatus(int $status)
|
||||
{
|
||||
if(!TaskStatus::isValidValue($status)) {
|
||||
throw new InvalidEnumValue($status);
|
||||
throw new InvalidEnumValue((string) $status);
|
||||
}
|
||||
|
||||
$this->status = $status;
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@ class TaskTemplate extends Task
|
|||
* @var TaskType
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $type = TaskType::TEMPLATE;
|
||||
protected $type = TaskType::TEMPLATE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user