Implement php 7.4 type hints

This commit is contained in:
Dennis Eichhorn 2019-08-15 21:55:12 +02:00
parent 1a7650caaf
commit 78547922f3
7 changed files with 29 additions and 29 deletions

View File

@ -66,7 +66,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $providing = [ protected static array $providing = [
'Navigation', 'Navigation',
]; ];
@ -76,5 +76,5 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $dependencies = []; protected static array $dependencies = [];
} }

View File

@ -34,7 +34,7 @@ final class AccountRelationMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>> * @var array<string, array<string, bool|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static array $columns = [
'task_account_id' => ['name' => 'task_account_id', 'type' => 'int', 'internal' => 'id'], 'task_account_id' => ['name' => 'task_account_id', 'type' => 'int', 'internal' => 'id'],
'task_account_duty' => ['name' => 'task_account_duty', 'type' => 'int', 'internal' => 'duty'], 'task_account_duty' => ['name' => 'task_account_duty', 'type' => 'int', 'internal' => 'duty'],
'task_account_account' => ['name' => 'task_account_account', 'type' => 'int', 'internal' => 'relation'], 'task_account_account' => ['name' => 'task_account_account', 'type' => 'int', 'internal' => 'relation'],
@ -47,7 +47,7 @@ final class AccountRelationMapper extends DataMapperAbstract
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $ownsOne = [ protected static array $ownsOne = [
'relation' => [ 'relation' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'src' => 'task_account_account', 'src' => 'task_account_account',
@ -60,7 +60,7 @@ final class AccountRelationMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'task_account'; protected static string $table = 'task_account';
/** /**
* Primary field name. * Primary field name.
@ -68,5 +68,5 @@ final class AccountRelationMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'task_account_id'; protected static string $primaryField = 'task_account_id';
} }

View File

@ -34,7 +34,7 @@ final class GroupRelationMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>> * @var array<string, array<string, bool|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static array $columns = [
'task_group_id' => ['name' => 'task_group_id', 'type' => 'int', 'internal' => 'id'], 'task_group_id' => ['name' => 'task_group_id', 'type' => 'int', 'internal' => 'id'],
'task_group_duty' => ['name' => 'task_group_duty', 'type' => 'int', 'internal' => 'duty'], 'task_group_duty' => ['name' => 'task_group_duty', 'type' => 'int', 'internal' => 'duty'],
'task_group_group' => ['name' => 'task_group_group', 'type' => 'int', 'internal' => 'relation'], 'task_group_group' => ['name' => 'task_group_group', 'type' => 'int', 'internal' => 'relation'],
@ -47,7 +47,7 @@ final class GroupRelationMapper extends DataMapperAbstract
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $ownsOne = [ protected static array $ownsOne = [
'relation' => [ 'relation' => [
'mapper' => GroupMapper::class, 'mapper' => GroupMapper::class,
'src' => 'task_group_group', 'src' => 'task_group_group',
@ -60,7 +60,7 @@ final class GroupRelationMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'task_group'; protected static string $table = 'task_group';
/** /**
* Primary field name. * Primary field name.
@ -68,5 +68,5 @@ final class GroupRelationMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'task_group_id'; protected static string $primaryField = 'task_group_id';
} }

View File

@ -57,7 +57,7 @@ class Task implements \JsonSerializable
/** /**
* Created. * Created.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected $createdAt = null; protected $createdAt = null;
@ -113,7 +113,7 @@ class Task implements \JsonSerializable
/** /**
* Start. * Start.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected $start = null; protected $start = null;
@ -121,7 +121,7 @@ class Task implements \JsonSerializable
/** /**
* Due. * Due.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected $due = null; protected $due = null;
@ -129,7 +129,7 @@ class Task implements \JsonSerializable
/** /**
* Done. * Done.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected $done = null; protected $done = null;

View File

@ -73,7 +73,7 @@ class TaskElement implements \JsonSerializable
/** /**
* Created. * Created.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
private $createdAt = null; private $createdAt = null;
@ -89,7 +89,7 @@ class TaskElement implements \JsonSerializable
/** /**
* Due. * Due.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
private $due = null; private $due = null;

View File

@ -35,7 +35,7 @@ final class TaskElementMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>> * @var array<string, array<string, bool|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static array $columns = [
'task_element_id' => ['name' => 'task_element_id', 'type' => 'int', 'internal' => 'id'], 'task_element_id' => ['name' => 'task_element_id', 'type' => 'int', 'internal' => 'id'],
'task_element_desc' => ['name' => 'task_element_desc', 'type' => 'string', 'internal' => 'description'], 'task_element_desc' => ['name' => 'task_element_desc', 'type' => 'string', 'internal' => 'description'],
'task_element_desc_raw' => ['name' => 'task_element_desc_raw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'task_element_desc_raw' => ['name' => 'task_element_desc_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
@ -53,7 +53,7 @@ final class TaskElementMapper extends DataMapperAbstract
* @var array<string, array<string, null|string>> * @var array<string, array<string, null|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $hasMany = [ protected static array $hasMany = [
'media' => [ 'media' => [
'mapper' => MediaMapper::class, 'mapper' => MediaMapper::class,
'table' => 'task_element_media', 'table' => 'task_element_media',
@ -80,7 +80,7 @@ final class TaskElementMapper extends DataMapperAbstract
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $belongsTo = [ protected static array $belongsTo = [
'createdBy' => [ 'createdBy' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'src' => 'task_element_created_by', 'src' => 'task_element_created_by',
@ -93,7 +93,7 @@ final class TaskElementMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'task_element'; protected static string $table = 'task_element';
/** /**
* Created at. * Created at.
@ -101,7 +101,7 @@ final class TaskElementMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $createdAt = 'task_element_created_at'; protected static string $createdAt = 'task_element_created_at';
/** /**
* Primary field name. * Primary field name.
@ -109,5 +109,5 @@ final class TaskElementMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'task_element_id'; protected static string $primaryField = 'task_element_id';
} }

View File

@ -37,7 +37,7 @@ final class TaskMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string>> * @var array<string, array<string, bool|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static array $columns = [
'task_id' => ['name' => 'task_id', 'type' => 'int', 'internal' => 'id'], 'task_id' => ['name' => 'task_id', 'type' => 'int', 'internal' => 'id'],
'task_title' => ['name' => 'task_title', 'type' => 'string', 'internal' => 'title'], 'task_title' => ['name' => 'task_title', 'type' => 'string', 'internal' => 'title'],
'task_desc' => ['name' => 'task_desc', 'type' => 'string', 'internal' => 'description'], 'task_desc' => ['name' => 'task_desc', 'type' => 'string', 'internal' => 'description'],
@ -61,7 +61,7 @@ final class TaskMapper extends DataMapperAbstract
* @var array<string, array<string, null|string>> * @var array<string, array<string, null|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $hasMany = [ protected static array $hasMany = [
'taskElements' => [ 'taskElements' => [
'mapper' => TaskElementMapper::class, 'mapper' => TaskElementMapper::class,
'table' => 'task_element', 'table' => 'task_element',
@ -88,7 +88,7 @@ final class TaskMapper extends DataMapperAbstract
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $belongsTo = [ protected static array $belongsTo = [
'createdBy' => [ 'createdBy' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'src' => 'task_created_by', 'src' => 'task_created_by',
@ -101,7 +101,7 @@ final class TaskMapper extends DataMapperAbstract
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $ownsOne = [ protected static array $ownsOne = [
'schedule' => [ 'schedule' => [
'mapper' => ScheduleMapper::class, 'mapper' => ScheduleMapper::class,
'src' => 'task_schedule', 'src' => 'task_schedule',
@ -114,7 +114,7 @@ final class TaskMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'task'; protected static string $table = 'task';
/** /**
* Created at. * Created at.
@ -122,7 +122,7 @@ final class TaskMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $createdAt = 'task_created_at'; protected static string $createdAt = 'task_created_at';
/** /**
* Primary field name. * Primary field name.
@ -130,7 +130,7 @@ final class TaskMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'task_id'; protected static string $primaryField = 'task_id';
/** /**
* Get open tasks by createdBy * Get open tasks by createdBy