Implement php 7.4 type hints

This commit is contained in:
Dennis Eichhorn 2019-08-15 21:55:12 +02:00
parent e3ae3adc6a
commit 77b0aa961e
5 changed files with 17 additions and 17 deletions

View File

@ -74,7 +74,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string[]
* @since 1.0.0
*/
protected static $providing = [];
protected static array $providing = [];
/**
* Dependencies.
@ -82,5 +82,5 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string[]
* @since 1.0.0
*/
protected static $dependencies = [];
protected static array $dependencies = [];
}

View File

@ -68,7 +68,7 @@ class Report implements \JsonSerializable
/**
* Report created at.
*
* @var \DateTime
* @var null|\DateTime
* @since 1.0.0
*/
protected $createdAt = null;

View File

@ -26,7 +26,7 @@ final class ReportMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static $columns = [
protected static array $columns = [
'helper_report_id' => ['name' => 'helper_report_id', 'type' => 'int', 'internal' => 'id'],
'helper_report_status' => ['name' => 'helper_report_status', 'type' => 'int', 'internal' => 'status'],
'helper_report_title' => ['name' => 'helper_report_title', 'type' => 'string', 'internal' => 'title'],
@ -44,7 +44,7 @@ final class ReportMapper extends DataMapperAbstract
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static $ownsOne = [
protected static array $ownsOne = [
'source' => [
'mapper' => \Modules\Media\Models\CollectionMapper::class,
'src' => 'helper_report_media',
@ -61,7 +61,7 @@ final class ReportMapper extends DataMapperAbstract
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static $belongsTo = [
protected static array $belongsTo = [
'createdBy' => [
'mapper' => AccountMapper::class,
'src' => 'helper_report_creator',
@ -74,7 +74,7 @@ final class ReportMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $table = 'helper_report';
protected static string $table = 'helper_report';
/**
* Primary field name.
@ -82,7 +82,7 @@ final class ReportMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $primaryField = 'helper_report_id';
protected static string $primaryField = 'helper_report_id';
/**
* Created at.
@ -90,5 +90,5 @@ final class ReportMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $createdAt = 'helper_report_created';
protected static string $createdAt = 'helper_report_created';
}

View File

@ -84,7 +84,7 @@ class Template implements \JsonSerializable
/**
* Template created at.
*
* @var \DateTime
* @var null|\DateTime
* @since 1.0.0
*/
protected $createdAt = null;

View File

@ -27,7 +27,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static $columns = [
protected static array $columns = [
'helper_template_id' => ['name' => 'helper_template_id', 'type' => 'int', 'internal' => 'id'],
'helper_template_status' => ['name' => 'helper_template_status', 'type' => 'int', 'internal' => 'status'],
'helper_template_title' => ['name' => 'helper_template_title', 'type' => 'string', 'internal' => 'name'],
@ -49,7 +49,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static $ownsOne = [
protected static array $ownsOne = [
'source' => [
'mapper' => CollectionMapper::class,
'src' => 'helper_template_media',
@ -62,7 +62,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static $belongsTo = [
protected static array $belongsTo = [
'createdBy' => [
'mapper' => AccountMapper::class,
'src' => 'helper_template_creator',
@ -75,7 +75,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var array<string, array<string, null|string>>
* @since 1.0.0
*/
protected static $hasMany = [
protected static array $hasMany = [
'reports' => [
'mapper' => ReportMapper::class,
'table' => 'helper_report',
@ -90,7 +90,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $table = 'helper_template';
protected static string $table = 'helper_template';
/**
* Created at.
@ -98,7 +98,7 @@ final class TemplateMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $createdAt = 'helper_template_created';
protected static string $createdAt = 'helper_template_created';
/**
* Primary field name.
@ -106,5 +106,5 @@ final class TemplateMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $primaryField = 'helper_template_id';
protected static string $primaryField = 'helper_template_id';
}