mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
phpcs, static and unit test fixes
This commit is contained in:
parent
6f72c56c6c
commit
6be238c3b2
|
|
@ -26,4 +26,11 @@ use phpOMS\Module\InstallerAbstract;
|
|||
*/
|
||||
final class Installer extends InstallerAbstract
|
||||
{
|
||||
/**
|
||||
* Path of the file
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const PATH = __DIR__;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,11 @@ use phpOMS\Module\StatusAbstract;
|
|||
*/
|
||||
final class Status extends StatusAbstract
|
||||
{
|
||||
/**
|
||||
* Path of the file
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const PATH = __DIR__;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,13 @@ use phpOMS\Module\UninstallerAbstract;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class Uninstaller extends UninstallerAbstract
|
||||
final class Installer extends InstallerAbstract
|
||||
{
|
||||
/**
|
||||
* Path of the file
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const PATH = __DIR__;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ final class ApiController extends Controller
|
|||
$task->title = (string) ($request->getData('title') ?? $task->title);
|
||||
$task->description = Markdown::parse((string) ($request->getData('plain') ?? $task->descriptionRaw));
|
||||
$task->descriptionRaw = (string) ($request->getData('plain') ?? $task->descriptionRaw);
|
||||
$task->due = new \DateTime((string) ($request->getData('due') ?? $task->due->format('Y-m-d H:i:s')));
|
||||
$task->due = $request->getData('due') !== null ? new \DateTime((string) ($request->getData('due'))) : $task->due;
|
||||
$task->setStatus((int) ($request->getData('status') ?? $task->getStatus()));
|
||||
$task->setType((int) ($request->getData('type') ?? $task->getType()));
|
||||
$task->setPriority((int) ($request->getData('priority') ?? $task->getPriority()));
|
||||
|
|
@ -428,7 +428,7 @@ final class ApiController extends Controller
|
|||
{
|
||||
/** @var TaskElement $element */
|
||||
$element = TaskElementMapper::get((int) ($request->getData('id')));
|
||||
$element->due = new \DateTime((string) ($request->getData('due') ?? $element->due->format('Y-m-d H:i:s')));
|
||||
$element->due = $request->getData('due') !== null ? new \DateTime((string) ($request->getData('due'))) : $element->due;
|
||||
$element->setStatus((int) ($request->getData('status') ?? $element->getStatus()));
|
||||
$element->description = Markdown::parse((string) ($request->getData('plain') ?? $element->descriptionRaw));
|
||||
$element->descriptionRaw = (string) ($request->getData('plain') ?? $element->descriptionRaw);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user