From 061df3c3205d68b692d7c994e88d812a7d49dee1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 17 Aug 2019 14:14:51 +0200 Subject: [PATCH] fix after change to php 7.4 --- Models/Report.php | 14 +++++++------- Models/Template.php | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Models/Report.php b/Models/Report.php index a300f80..1d2c3cd 100644 --- a/Models/Report.php +++ b/Models/Report.php @@ -31,7 +31,7 @@ class Report implements \JsonSerializable * @var int * @since 1.0.0 */ - private $id = 0; + private int $id = 0; /** * Report status. @@ -39,7 +39,7 @@ class Report implements \JsonSerializable * @var int * @since 1.0.0 */ - private $status = HelperStatus::INACTIVE; + private int $status = HelperStatus::INACTIVE; /** * Report title. @@ -47,7 +47,7 @@ class Report implements \JsonSerializable * @var string * @since 1.0.0 */ - private $title = ''; + private string $title = ''; /** * Report description. @@ -55,7 +55,7 @@ class Report implements \JsonSerializable * @var string * @since 1.0.0 */ - private $description = ''; + private string $description = ''; /** * Report description. @@ -63,7 +63,7 @@ class Report implements \JsonSerializable * @var string * @since 1.0.0 */ - private $descriptionRaw = ''; + private string $descriptionRaw = ''; /** * Report created at. @@ -71,7 +71,7 @@ class Report implements \JsonSerializable * @var null|\DateTime * @since 1.0.0 */ - protected $createdAt = null; + protected ?\DateTime $createdAt = null; /** * Report created by. @@ -84,7 +84,7 @@ class Report implements \JsonSerializable /** * Report template. * - * @var int + * @var null|int|Media * @since 1.0.0 */ private $template = 0; diff --git a/Models/Template.php b/Models/Template.php index 89d9594..b503f62 100644 --- a/Models/Template.php +++ b/Models/Template.php @@ -31,7 +31,7 @@ class Template implements \JsonSerializable * @var int * @since 1.0.0 */ - private $id = 0; + private int $id = 0; /** * Template status. @@ -39,15 +39,15 @@ class Template implements \JsonSerializable * @var int * @since 1.0.0 */ - private $status = HelperStatus::INACTIVE; + private int $status = HelperStatus::INACTIVE; /** - * Template data source. + * Template data type. * * @var int * @since 1.0.0 */ - private $datatype = TemplateDataType::OTHER; + private int $datatype = TemplateDataType::OTHER; /** * Template doesn't need reports. @@ -55,7 +55,7 @@ class Template implements \JsonSerializable * @var bool * @since 1.0.0 */ - private $isStandalone = false; + private bool $isStandalone = false; /** * Template name. @@ -63,7 +63,7 @@ class Template implements \JsonSerializable * @var string * @since 1.0.0 */ - private $name = ''; + private string $name = ''; /** * Template description. @@ -71,7 +71,7 @@ class Template implements \JsonSerializable * @var string * @since 1.0.0 */ - private $description = ''; + private string $description = ''; /** * Template description. @@ -79,7 +79,7 @@ class Template implements \JsonSerializable * @var string * @since 1.0.0 */ - private $descriptionRaw = ''; + private string $descriptionRaw = ''; /** * Template created at. @@ -87,7 +87,7 @@ class Template implements \JsonSerializable * @var null|\DateTime * @since 1.0.0 */ - protected $createdAt = null; + protected ?\DateTime $createdAt = null; /** * Template created by. @@ -100,7 +100,7 @@ class Template implements \JsonSerializable /** * Template source. * - * @var int + * @var int|Media * @since 1.0.0 */ private $source = 0; @@ -111,7 +111,7 @@ class Template implements \JsonSerializable * @var array * @since 1.0.0 */ - private $expected = []; + private array $expected = []; /** * Reports. @@ -119,7 +119,7 @@ class Template implements \JsonSerializable * @var array * @since 1.0.0 */ - private $reports = []; + private array $reports = []; /** * Constructor