From 6f506e127b5ad36d03fc78557b59c0b445edcd09 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 27 Nov 2020 22:56:16 +0100 Subject: [PATCH] phpstan fixes --- Models/KanbanCard.php | 15 +++++++++++---- Models/KanbanCardComment.php | 2 +- Models/KanbanColumn.php | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Models/KanbanCard.php b/Models/KanbanCard.php index af18dab..af6adac 100755 --- a/Models/KanbanCard.php +++ b/Models/KanbanCard.php @@ -17,6 +17,7 @@ namespace Modules\Kanban\Models; use Modules\Admin\Models\Account; use Modules\Admin\Models\NullAccount; use Modules\Tasks\Models\Task; +use Modules\Media\Models\Media; /** * Kanban card class. @@ -56,11 +57,11 @@ class KanbanCard implements \JsonSerializable */ public string $description = ''; - private $column = 0; + private int $column = 0; - private $order = 0; + private int $order = 0; - private $ref = 0; + private int $ref = 0; public Account $createdBy; @@ -70,6 +71,12 @@ class KanbanCard implements \JsonSerializable private array $labels = []; + /** + * Media + * + * @var Media[] + * @since 1.0.0 + */ private array $media = []; /** @@ -290,7 +297,7 @@ class KanbanCard implements \JsonSerializable * * @since 1.0.0 */ - public function addMedia($media) : void + public function addMedia(Media $media) : void { $this->media[] = $media; } diff --git a/Models/KanbanCardComment.php b/Models/KanbanCardComment.php index d623ba5..048e981 100755 --- a/Models/KanbanCardComment.php +++ b/Models/KanbanCardComment.php @@ -43,7 +43,7 @@ class KanbanCardComment implements \JsonSerializable */ public string $description = ''; - private $card = 0; + private int $card = 0; public Account $createdBy; diff --git a/Models/KanbanColumn.php b/Models/KanbanColumn.php index 2c04607..75ecd66 100755 --- a/Models/KanbanColumn.php +++ b/Models/KanbanColumn.php @@ -48,7 +48,7 @@ class KanbanColumn implements \JsonSerializable */ private int $order = 0; - private $board = 0; + private int $board = 0; /** * Cards