fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:48:00 +02:00
parent 53fa3aa631
commit 3c7ac81c56
33 changed files with 397 additions and 393 deletions

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @package Modules\Calendar\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Navigation
{
@ -34,7 +34,7 @@ class Navigation
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public static function install(string $path, DatabasePool $dbPool) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\InstallerAbstract;
/**
* Installer class.
*
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Installer extends InstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\StatusAbstract;
/**
* Navigation class.
*
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Status extends StatusAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Uninstaller extends UninstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Updater extends UpdaterAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,21 +26,23 @@ use phpOMS\Views\View;
/**
* Calendar controller class.
*
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BackendController extends Controller
{
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewCalendarDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -65,13 +67,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\Module\WebInterface;
/**
* Calendar controller class.
*
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Controller extends ModuleAbstract implements WebInterface
{
@ -31,7 +31,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module path.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__ . '/../';
@ -39,7 +39,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module version.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
@ -47,7 +47,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module name.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'Calendar';
@ -55,7 +55,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000900000;
@ -63,7 +63,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [];
@ -71,7 +71,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Dependencies.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $dependencies = [];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Accept status enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class AcceptStatus extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Available status enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class AvailableStatus extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\SmartDateTime;
/**
* Calendar class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Calendar
{
@ -30,7 +30,7 @@ class Calendar
/**
* Calendar ID.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $id = 0;
@ -38,7 +38,7 @@ class Calendar
/**
* Name.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $name = '';
@ -46,7 +46,7 @@ class Calendar
/**
* Description.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $description = '';
@ -54,7 +54,7 @@ class Calendar
/**
* Created at.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $createdAt = null;
@ -62,7 +62,7 @@ class Calendar
/**
* Current date of the calendar.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $date = null;
@ -70,7 +70,7 @@ class Calendar
/**
* Events.
*
* @var array<int, \Modules\Calendar\Models\Event>
* @var array<int, \Modules\Calendar\Models\Event>
* @since 1.0.0
*/
private $events = [];
@ -78,7 +78,7 @@ class Calendar
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct()
{
@ -89,7 +89,7 @@ class Calendar
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -99,7 +99,7 @@ class Calendar
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getName() : string
{
@ -109,7 +109,7 @@ class Calendar
/**
* @param string $name Calendar name/title
*
* @since 1.0.0
* @since 1.0.0
*/
public function setName(string $name) : void
{
@ -119,7 +119,7 @@ class Calendar
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDescription() : string
{
@ -131,7 +131,7 @@ class Calendar
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDescription(string $desc) : void
{
@ -143,7 +143,7 @@ class Calendar
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function addEvent(Event $event) : int
{
@ -159,7 +159,7 @@ class Calendar
/**
* @return Event[]
*
* @since 1.0.0
* @since 1.0.0
*/
public function getEvents() : array
{
@ -171,7 +171,7 @@ class Calendar
*
* @return bool
*
* @since 1.0.0
* @since 1.0.0
*/
public function removeEvent(int $id) : bool
{
@ -189,7 +189,7 @@ class Calendar
*
* @return Event
*
* @since 1.0.0
* @since 1.0.0
*/
public function getEvent(int $id) : Event
{
@ -199,7 +199,7 @@ class Calendar
/**
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedAt() : \DateTime
{
@ -211,7 +211,7 @@ class Calendar
*
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDate() : \DateTime
{
@ -223,7 +223,7 @@ class Calendar
*
* @param \DateTime $date Current date
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDate(\DateTime $date) : void
{
@ -237,7 +237,7 @@ class Calendar
*
* @return Event[]
*
* @since 1.0.0
* @since 1.0.0
*/
public function getEventByDate(\DateTime $date) : array
{
@ -258,7 +258,7 @@ class Calendar
*
* @return bool
*
* @since 1.0.0
* @since 1.0.0
*/
public function hasEventOnDate(\DateTime $date) : bool
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @todo only load events of 3 month or 1 year?!
*/
declare(strict_types=1);
@ -20,17 +20,17 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* Mapper class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class CalendarMapper extends DataMapperAbstract
{
/**
* Class name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static $CLASS = __CLASS__;
@ -38,7 +38,7 @@ final class CalendarMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -51,7 +51,7 @@ final class CalendarMapper extends DataMapperAbstract
/**
* Has many relation.
*
* @var array<string, array<string, null|string>>
* @var array<string, array<string, null|string>>
* @since 1.0.0
*/
protected static array $hasMany = [
@ -66,7 +66,7 @@ final class CalendarMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'calendar';
@ -74,7 +74,7 @@ final class CalendarMapper extends DataMapperAbstract
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'calendar_created_at';
@ -82,7 +82,7 @@ final class CalendarMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'calendar_id';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Location;
/**
* Event class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Event
{
@ -32,7 +32,7 @@ class Event
/**
* Calendar ID.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $id = 0;
@ -40,7 +40,7 @@ class Event
/**
* Name.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $name = '';
@ -48,7 +48,7 @@ class Event
/**
* Description.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $description = '';
@ -56,7 +56,7 @@ class Event
/**
* Created.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $createdAt = null;
@ -64,7 +64,7 @@ class Event
/**
* Creator.
*
* @var int
* @var int
* @since 1.0.0
*/
private $createdBy = 0;
@ -74,7 +74,7 @@ class Event
*
* Single event or a template (templates have a repeating)
*
* @var int
* @var int
* @since 1.0.0
*/
private int $type = EventType::SINGLE;
@ -84,7 +84,7 @@ class Event
*
* Active, inactive etc.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $status = EventStatus::ACTIVE;
@ -92,7 +92,7 @@ class Event
/**
* Schedule
*
* @var null|int|Schedule
* @var null|int|Schedule
* @since 1.0.0
*/
private $schedule = null;
@ -100,7 +100,7 @@ class Event
/**
* Location of the event.
*
* @var Location
* @var Location
* @since 1.0.0
*/
private ?Location $location = null;
@ -108,7 +108,7 @@ class Event
/**
* Calendar
*
* @var int
* @var int
* @since 1.0.0
*/
private $calendar = null;
@ -116,7 +116,7 @@ class Event
/**
* People.
*
* @var array
* @var array
* @since 1.0.0
*/
private array $people = [];
@ -124,7 +124,7 @@ class Event
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct()
{
@ -136,7 +136,7 @@ class Event
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -146,7 +146,7 @@ class Event
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getName() : string
{
@ -156,7 +156,7 @@ class Event
/**
* @return Account[]
*
* @since 1.0.0
* @since 1.0.0
*/
public function getPeople() : array
{
@ -168,7 +168,7 @@ class Event
*
* @return Account
*
* @since 1.0.0
* @since 1.0.0
*/
public function getPerson(int $id) : Account
{
@ -180,7 +180,7 @@ class Event
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function addPerson(Account $person) : void
{
@ -194,7 +194,7 @@ class Event
*
* @return bool
*
* @since 1.0.0
* @since 1.0.0
*/
public function removePerson(int $id) : bool
{
@ -210,7 +210,7 @@ class Event
/**
* @param string $name Event name/title
*
* @since 1.0.0
* @since 1.0.0
*/
public function setName(string $name) : void
{
@ -220,7 +220,7 @@ class Event
/**
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDescription() : string
{
@ -230,7 +230,7 @@ class Event
/**
* @param string $desc Event description
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDescription(string $desc) : void
{
@ -240,7 +240,7 @@ class Event
/**
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedAt() : \DateTime
{
@ -250,7 +250,7 @@ class Event
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedBy() : int
{
@ -260,7 +260,7 @@ class Event
/**
* @param $createdBy Creator
*
* @since 1.0.0
* @since 1.0.0
*/
public function setCreatedBy(int $createdBy) : void
{
@ -271,7 +271,7 @@ class Event
/**
* @param Location $location Event location
*
* @since 1.0.0
* @since 1.0.0
*/
public function setLocation(Location $location) : void
{
@ -281,7 +281,7 @@ class Event
/**
* @return Location
*
* @since 1.0.0
* @since 1.0.0
*/
public function getLocation() : Location
{
@ -291,7 +291,7 @@ class Event
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCalendar() : int
{
@ -301,7 +301,7 @@ class Event
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getType() : int
{
@ -311,7 +311,7 @@ class Event
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getStatus() : int
{
@ -321,7 +321,7 @@ class Event
/**
* @param int $calendar Calendar
*
* @since 1.0.0
* @since 1.0.0
*/
public function setCalendar(int $calendar) : void
{
@ -331,7 +331,7 @@ class Event
/**
* @return Schedule
*
* @since 1.0.0
* @since 1.0.0
*/
public function getSchedule() : Schedule
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* Mapper class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class EventMapper extends DataMapperAbstract
{
@ -30,7 +30,7 @@ final class EventMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -49,7 +49,7 @@ final class EventMapper extends DataMapperAbstract
/**
* Has one relation.
*
* @var array<string, array<string, string>>
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static array $ownsOne = [
@ -62,7 +62,7 @@ final class EventMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'calendar_event';
@ -70,7 +70,7 @@ final class EventMapper extends DataMapperAbstract
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'calendar_event_created_at';
@ -78,7 +78,7 @@ final class EventMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'calendar_event_id';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Event type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class EventStatus extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,17 +17,17 @@ namespace Modules\Calendar\Models;
/**
* Event template class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class EventTemplate extends Event
{
/**
* Type.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $type = EventType::TEMPLATE;

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Event type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class EventType extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Frequency interval type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class FrequencyInterval extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Frequency relative type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class FrequencyRelative extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Frequency type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class FrequencyType extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Interval type type enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class IntervalType extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Calendar\Models;
/**
* Calendar class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullCalendar extends Calendar
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Calendar\Models;
/**
* Null event class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullEvent extends Event
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Calendar\Models;
/**
* Schedule class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullSchedule extends Schedule
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class PermissionState extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,17 +19,17 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
/**
* Schedule class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Schedule
{
/**
* Schedule ID.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $id = 0;
@ -37,7 +37,7 @@ class Schedule
/**
* Calendar uid.
*
* @var string
* @var string
* @since 1.0.0
*/
private string $uid = '';
@ -45,7 +45,7 @@ class Schedule
/**
* Schedule status.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $status = ScheduleStatus::ACTIVE;
@ -53,7 +53,7 @@ class Schedule
/**
* Frequency type.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $freqType = FrequencyType::ONCE;
@ -61,7 +61,7 @@ class Schedule
/**
* Frequency interval.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $freqInterval = FrequencyInterval::DAY;
@ -69,7 +69,7 @@ class Schedule
/**
* Frequency relative.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $relativeInternal = FrequencyRelative::FIRST;
@ -77,7 +77,7 @@ class Schedule
/**
* Interval type.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $intervalType = IntervalType::ABSOLUTE;
@ -85,7 +85,7 @@ class Schedule
/**
* Recurrence factor.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $recurrenceFactor = 0;
@ -93,7 +93,7 @@ class Schedule
/**
* Start.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $start = null;
@ -101,7 +101,7 @@ class Schedule
/**
* Duration.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $duration = 3600;
@ -109,7 +109,7 @@ class Schedule
/**
* End.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $end = null;
@ -117,7 +117,7 @@ class Schedule
/**
* Created at.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $createdAt = null;
@ -125,7 +125,7 @@ class Schedule
/**
* Created by.
*
* @var int
* @var int
* @since 1.0.0
*/
private $createdBy = 0;
@ -133,7 +133,7 @@ class Schedule
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct()
{
@ -146,7 +146,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -156,7 +156,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getStatus() : int
{
@ -168,7 +168,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setStatus(int $status)
{
@ -184,7 +184,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getFreqType() : int
{
@ -196,7 +196,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setFreqType(int $freqType)
{
@ -212,7 +212,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getIntervalType() : int
{
@ -224,7 +224,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setIntervalType(int $intervalType)
{
@ -240,7 +240,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getFrequencyRelative() : int
{
@ -252,7 +252,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setFrequencyRelative(int $relativeInterval)
{
@ -270,7 +270,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setFreqInterval(int $freqInterval)
{
@ -286,7 +286,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getFreqInterval() : int
{
@ -296,7 +296,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getRecurrenceFactor() : int
{
@ -308,7 +308,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setRecurrenceFactor(int $recurrence)
{
@ -320,7 +320,7 @@ class Schedule
/**
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getStart() : \DateTime
{
@ -332,7 +332,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setStart(\DateTime $start)
{
@ -344,7 +344,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getDuration() : int
{
@ -356,7 +356,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setDuration(int $duration)
{
@ -372,7 +372,7 @@ class Schedule
/**
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getEnd() : \DateTime
{
@ -384,7 +384,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setEnd(\DateTime $end)
{
@ -398,7 +398,7 @@ class Schedule
*
* @return $this
*
* @since 1.0.0
* @since 1.0.0
*/
public function setCreatedBy(int $creator)
{
@ -410,7 +410,7 @@ class Schedule
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedBy() : int
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* Mapper class.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ScheduleMapper extends DataMapperAbstract
{
@ -30,7 +30,7 @@ final class ScheduleMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -52,7 +52,7 @@ final class ScheduleMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'schedule';
@ -60,7 +60,7 @@ final class ScheduleMapper extends DataMapperAbstract
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'schedule_created_at';
@ -68,7 +68,7 @@ final class ScheduleMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'schedule_id';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Calendar\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Schedule status enum.
*
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Calendar\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class ScheduleStatus extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Views\View;
/**
* Component view.
*
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Views\View;
/**
* Component view.
*
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package TBD
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Navigation' => [
'Calendar' => 'Calendar',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
$MODLANG[1] = [
];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Calendar' => [
'Blocks' => 'Blocks',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
?>
<div id="calendar-dashboard" class="col-xs-12 col-md-6" draggable="true">