From b7f741fcbaa6e8a74f7eb51d02b9142259215f8f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 15 Aug 2019 21:55:12 +0200 Subject: [PATCH] Implement php 7.4 type hints --- Controller/Controller.php | 4 ++-- Models/KanbanBoardMapper.php | 12 ++++++------ Models/KanbanCardCommentMapper.php | 10 +++++----- Models/KanbanCardMapper.php | 12 ++++++------ Models/KanbanColumnMapper.php | 8 ++++---- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index 71d670f..516af18 100644 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -66,7 +66,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string[] * @since 1.0.0 */ - protected static $providing = []; + protected static array $providing = []; /** * Dependencies. @@ -74,5 +74,5 @@ class Controller extends ModuleAbstract implements WebInterface * @var string[] * @since 1.0.0 */ - protected static $dependencies = []; + protected static array $dependencies = []; } diff --git a/Models/KanbanBoardMapper.php b/Models/KanbanBoardMapper.php index c061b44..957d002 100644 --- a/Models/KanbanBoardMapper.php +++ b/Models/KanbanBoardMapper.php @@ -34,7 +34,7 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'kanban_board_id' => ['name' => 'kanban_board_id', 'type' => 'int', 'internal' => 'id'], 'kanban_board_name' => ['name' => 'kanban_board_name', 'type' => 'string', 'internal' => 'name'], 'kanban_board_desc' => ['name' => 'kanban_board_desc', 'type' => 'string', 'internal' => 'description'], @@ -50,7 +50,7 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'columns' => [ 'mapper' => KanbanColumnMapper::class, 'table' => 'kanban_column', @@ -65,7 +65,7 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $belongsTo = [ + protected static array $belongsTo = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'src' => 'kanban_board_created_by', @@ -78,7 +78,7 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'kanban_board'; + protected static string $table = 'kanban_board'; /** * Created at. @@ -86,7 +86,7 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'kanban_board_created_at'; + protected static string $createdAt = 'kanban_board_created_at'; /** * Primary field name. @@ -94,5 +94,5 @@ final class KanbanBoardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'kanban_board_id'; + protected static string $primaryField = 'kanban_board_id'; } diff --git a/Models/KanbanCardCommentMapper.php b/Models/KanbanCardCommentMapper.php index 99340e5..e2c51cf 100644 --- a/Models/KanbanCardCommentMapper.php +++ b/Models/KanbanCardCommentMapper.php @@ -34,7 +34,7 @@ final class KanbanCardCommentMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'kanban_card_comment_id' => ['name' => 'kanban_card_comment_id', 'type' => 'int', 'internal' => 'id'], 'kanban_card_comment_description' => ['name' => 'kanban_card_comment_description', 'type' => 'string', 'internal' => 'description'], 'kanban_card_comment_card' => ['name' => 'kanban_card_comment_card', 'type' => 'int', 'internal' => 'card'], @@ -48,7 +48,7 @@ final class KanbanCardCommentMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'media' => [ 'mapper' => MediaMapper::class, 'table' => 'kanban_card_comment_media', @@ -63,7 +63,7 @@ final class KanbanCardCommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'kanban_card_comment'; + protected static string $table = 'kanban_card_comment'; /** * Created at. @@ -71,7 +71,7 @@ final class KanbanCardCommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'kanban_card_comment_created_at'; + protected static string $createdAt = 'kanban_card_comment_created_at'; /** * Primary field name. @@ -79,5 +79,5 @@ final class KanbanCardCommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'kanban_card_comment_id'; + protected static string $primaryField = 'kanban_card_comment_id'; } diff --git a/Models/KanbanCardMapper.php b/Models/KanbanCardMapper.php index 8d7bbd8..7eab2d5 100644 --- a/Models/KanbanCardMapper.php +++ b/Models/KanbanCardMapper.php @@ -35,7 +35,7 @@ final class KanbanCardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'], 'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'], 'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'], @@ -54,7 +54,7 @@ final class KanbanCardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $belongsTo = [ + protected static array $belongsTo = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'src' => 'kanban_card_created_by', @@ -67,7 +67,7 @@ final class KanbanCardMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'media' => [ 'mapper' => MediaMapper::class, 'table' => 'kanban_card_media', @@ -88,7 +88,7 @@ final class KanbanCardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'kanban_card'; + protected static string $table = 'kanban_card'; /** * Created at. @@ -96,7 +96,7 @@ final class KanbanCardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'kanban_card_created_at'; + protected static string $createdAt = 'kanban_card_created_at'; /** * Primary field name. @@ -104,5 +104,5 @@ final class KanbanCardMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'kanban_card_id'; + protected static string $primaryField = 'kanban_card_id'; } diff --git a/Models/KanbanColumnMapper.php b/Models/KanbanColumnMapper.php index 54e6964..48532b0 100644 --- a/Models/KanbanColumnMapper.php +++ b/Models/KanbanColumnMapper.php @@ -33,7 +33,7 @@ final class KanbanColumnMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'kanban_column_id' => ['name' => 'kanban_column_id', 'type' => 'int', 'internal' => 'id'], 'kanban_column_name' => ['name' => 'kanban_column_name', 'type' => 'string', 'internal' => 'name'], 'kanban_column_order' => ['name' => 'kanban_column_order', 'type' => 'int', 'internal' => 'order'], @@ -46,7 +46,7 @@ final class KanbanColumnMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'cards' => [ 'mapper' => KanbanCardMapper::class, 'table' => 'kanban_card', @@ -61,7 +61,7 @@ final class KanbanColumnMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'kanban_column'; + protected static string $table = 'kanban_column'; /** * Primary field name. @@ -69,5 +69,5 @@ final class KanbanColumnMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'kanban_column_id'; + protected static string $primaryField = 'kanban_column_id'; }