From 3bf404fdf4e6e34652f66bb76dd4ff2e5a0f25b6 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/EditorDoc.php | 2 +- Models/EditorDocMapper.php | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index f359fc4..3f237a8 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/EditorDoc.php b/Models/EditorDoc.php index 841aeac..2dd452f 100644 --- a/Models/EditorDoc.php +++ b/Models/EditorDoc.php @@ -70,7 +70,7 @@ class EditorDoc implements ArrayableInterface, \JsonSerializable /** * Created. * - * @var \DateTime + * @var null|\DateTime * @since 1.0.0 */ private $createdAt = null; diff --git a/Models/EditorDocMapper.php b/Models/EditorDocMapper.php index 579f398..29b0214 100644 --- a/Models/EditorDocMapper.php +++ b/Models/EditorDocMapper.php @@ -26,7 +26,7 @@ final class EditorDocMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'editor_doc_id' => ['name' => 'editor_doc_id', 'type' => 'int', 'internal' => 'id'], 'editor_doc_created_by' => ['name' => 'editor_doc_created_by', 'type' => 'int', 'internal' => 'createdBy'], 'editor_doc_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'], @@ -42,7 +42,7 @@ final class EditorDocMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $belongsTo = [ + protected static array $belongsTo = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'src' => 'editor_doc_created_by', @@ -55,7 +55,7 @@ final class EditorDocMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'editor_doc'; + protected static string $table = 'editor_doc'; /** * Primary field name. @@ -63,7 +63,7 @@ final class EditorDocMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'editor_doc_id'; + protected static string $primaryField = 'editor_doc_id'; /** * Created at. @@ -71,5 +71,5 @@ final class EditorDocMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'editor_doc_created_at'; + protected static string $createdAt = 'editor_doc_created_at'; }