diff --git a/Models/BoardStatus.php b/Models/BoardStatus.php index 5271619..e2dc928 100755 --- a/Models/BoardStatus.php +++ b/Models/BoardStatus.php @@ -17,7 +17,7 @@ namespace Modules\Kanban\Models; use phpOMS\Stdlib\Base\Enum; /** - * Task status enum. + * Board status enum. * * @package Modules\Kanban\Models * @license OMS License 1.0 diff --git a/Models/CardStatus.php b/Models/CardStatus.php index 0623971..87c9207 100755 --- a/Models/CardStatus.php +++ b/Models/CardStatus.php @@ -17,7 +17,7 @@ namespace Modules\Kanban\Models; use phpOMS\Stdlib\Base\Enum; /** - * Task status enum. + * Card status enum. * * @package Modules\Kanban\Models * @license OMS License 1.0 diff --git a/Models/KanbanBoard.php b/Models/KanbanBoard.php index 265a27e..685f263 100755 --- a/Models/KanbanBoard.php +++ b/Models/KanbanBoard.php @@ -44,8 +44,20 @@ class KanbanBoard implements \JsonSerializable */ public string $name = ''; + /** + * Board status. + * + * @var int + * @since 1.0.0 + */ private int $status = BoardStatus::ACTIVE; + /** + * Order. + * + * @var int + * @since 1.0.0 + */ public int $order = 0; /** @@ -64,6 +76,12 @@ class KanbanBoard implements \JsonSerializable */ public string $descriptionRaw = ''; + /** + * Board style. + * + * @var string + * @since 1.0.0 + */ public string $style = ''; /** @@ -74,10 +92,28 @@ class KanbanBoard implements \JsonSerializable */ private array $tags = []; + /** + * Creator. + * + * @var Account + * @since 1.0.0 + */ public Account $createdBy; + /** + * Created. + * + * @var \DateTimeImmutable + * @since 1.0.0 + */ public \DateTimeImmutable $createdAt; + /** + * Board columns. + * + * @var \Modules\Kanban\Models\KanbanColumn[] + * @since 1.0.0 + */ private array $columns = []; /** @@ -129,32 +165,6 @@ class KanbanBoard implements \JsonSerializable $this->status = $status; } - /** - * Get the order - * - * @return int - * - * @since 1.0.0 - */ - public function getOrder() : int - { - return $this->order; - } - - /** - * Set the order - * - * @param int $order Order - * - * @return void - * - * @since 1.0.0 - */ - public function setOrder(int $order) : void - { - $this->order = $order; - } - /** * Get tags * diff --git a/Models/KanbanCard.php b/Models/KanbanCard.php index d20bee0..b6876f1 100755 --- a/Models/KanbanCard.php +++ b/Models/KanbanCard.php @@ -46,12 +46,36 @@ class KanbanCard implements \JsonSerializable */ public string $name = ''; + /** + * Card status. + * + * @var int + * @since 1.0.0 + */ private int $status = CardStatus::ACTIVE; + /** + * Card type. + * + * @var int + * @since 1.0.0 + */ private int $type = CardType::TEXT; + /** + * Color schme. + * + * @var string + * @since 1.0.0 + */ public string $color = ''; + /** + * Card style. + * + * @var string + * @since 1.0.0 + */ public string $style = ''; /** @@ -78,16 +102,54 @@ class KanbanCard implements \JsonSerializable */ private array $tags = []; + /** + * Column this card belongs to. + * + * @var int + * @since 1.0.0 + */ private int $column = 0; - private int $order = 0; + /** + * Card order/position. + * + * @var int + * @since 1.0.0 + */ + public int $order = 0; + /** + * Reference of this card. + * + * The reference is based on the card type and can be a task, calendar, ... + * + * @var int + * @since 1.0.0 + */ private int $ref = 0; + /** + * Created by. + * + * @var Account + * @since 1.0.0 + */ public Account $createdBy; + /** + * Created at. + * + * @var \DateTimeImmutable + * @since 1.0.0 + */ public \DateTimeImmutable $createdAt; + /** + * Comments. + * + * @var \Modules\Kanban\Models\KanbanCardComment[] + * @since 1.0.0 + */ private array $comments = []; /** @@ -109,32 +171,6 @@ class KanbanCard implements \JsonSerializable $this->createdBy = new NullAccount(); } - /** - * Get the order - * - * @return int - * - * @since 1.0.0 - */ - public function getOrder() : int - { - return $this->order; - } - - /** - * Set the order - * - * @param int $order Order - * - * @return void - * - * @since 1.0.0 - */ - public function setOrder(int $order) : void - { - $this->order = $order; - } - /** * Get id. * diff --git a/Models/KanbanCardComment.php b/Models/KanbanCardComment.php index 48f7adf..6ca9e75 100755 --- a/Models/KanbanCardComment.php +++ b/Models/KanbanCardComment.php @@ -51,12 +51,36 @@ class KanbanCardComment implements \JsonSerializable */ public string $descriptionRaw = ''; + /** + * Card of the comment. + * + * @var int + * @since 1.0.0 + */ private int $card = 0; + /** + * Created by. + * + * @var Account + * @since 1.0.0 + */ public Account $createdBy; + /** + * Created. + * + * @var \DateTimeImmutable + * @since 1.0.0 + */ public \DateTimeImmutable $createdAt; + /** + * Media. + * + * @var Media[] + * @since 1.0.0 + */ private array $media = []; /** diff --git a/Models/KanbanColumn.php b/Models/KanbanColumn.php index 9a13726..77dd840 100755 --- a/Models/KanbanColumn.php +++ b/Models/KanbanColumn.php @@ -41,17 +41,23 @@ class KanbanColumn implements \JsonSerializable public string $name = ''; /** - * Column order + * Column order. * * @var int * @since 1.0.0 */ private int $order = 0; + /** + * Board. + * + * @var int + * @since 1.0.0 + */ private int $board = 0; /** - * Cards + * Cards. * * @var array * @since 1.0.0 diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 1c10bce..f7e0396 100755 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -38,6 +38,9 @@ class ControllerTest extends \PHPUnit\Framework\TestCase protected $module = null; + /** + * {@inheritdoc} + */ protected function setUp() : void { $this->app = new class() extends ApplicationAbstract