From 843e753ee6175d2c1f6aa320a1e6cf0224a99c71 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/CommentListMapper.php | 8 ++++---- Models/CommentMapper.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index 41c0847..b3d3b63 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/CommentListMapper.php b/Models/CommentListMapper.php index 273968a..456624b 100644 --- a/Models/CommentListMapper.php +++ b/Models/CommentListMapper.php @@ -33,7 +33,7 @@ final class CommentListMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], ]; @@ -43,7 +43,7 @@ final class CommentListMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'comments' => [ 'mapper' => CommentMapper::class, 'table' => 'comments_comment', @@ -58,7 +58,7 @@ final class CommentListMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'comments_list'; + protected static string $table = 'comments_list'; /** * Primary field name. @@ -66,5 +66,5 @@ final class CommentListMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'comments_list_id'; + protected static string $primaryField = 'comments_list_id'; } diff --git a/Models/CommentMapper.php b/Models/CommentMapper.php index 8951523..87e4308 100644 --- a/Models/CommentMapper.php +++ b/Models/CommentMapper.php @@ -33,7 +33,7 @@ final class CommentMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'comments_comment_id' => ['name' => 'comments_comment_id', 'type' => 'int', 'internal' => 'id'], 'comments_comment_title' => ['name' => 'comments_comment_title', 'type' => 'string', 'internal' => 'title'], 'comments_comment_status' => ['name' => 'comments_comment_status', 'type' => 'int', 'internal' => 'status'], @@ -51,7 +51,7 @@ final class CommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'comments_comment'; + protected static string $table = 'comments_comment'; /** * Created at. @@ -59,7 +59,7 @@ final class CommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'comments_comment_created_at'; + protected static string $createdAt = 'comments_comment_created_at'; /** * Primary field name. @@ -67,5 +67,5 @@ final class CommentMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'comments_comment_id'; + protected static string $primaryField = 'comments_comment_id'; }