From 58a4c1ac3526851baf8689b4cc50dae2f868fe1c 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 ++-- Interfaces/GSD/Model/GSDAddressMapper.php | 8 ++++---- Interfaces/GSD/Model/GSDArticleMapper.php | 8 ++++---- Interfaces/GSD/Model/GSDCostCenter.php | 2 +- Interfaces/GSD/Model/GSDCostCenterMapper.php | 8 ++++---- Interfaces/GSD/Model/GSDCostObject.php | 2 +- Interfaces/GSD/Model/GSDCostObjectMapper.php | 8 ++++---- Interfaces/GSD/Model/GSDCustomerMapper.php | 10 +++++----- Models/InterfaceManagerMapper.php | 6 +++--- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index fa0bc1d..c68d7a3 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/Interfaces/GSD/Model/GSDAddressMapper.php b/Interfaces/GSD/Model/GSDAddressMapper.php index a1f0ed2..1bf31d3 100644 --- a/Interfaces/GSD/Model/GSDAddressMapper.php +++ b/Interfaces/GSD/Model/GSDAddressMapper.php @@ -32,7 +32,7 @@ final class GSDAddressMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'AdressRowId' => ['name' => 'AdressRowId', 'type' => 'int', 'internal' => 'id'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], @@ -52,7 +52,7 @@ final class GSDAddressMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'KUNDENADRESSE'; + protected static string $table = 'KUNDENADRESSE'; /** * Created at. @@ -60,7 +60,7 @@ final class GSDAddressMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'row_create_time'; + protected static string $createdAt = 'row_create_time'; /** * Primary field name. @@ -68,5 +68,5 @@ final class GSDAddressMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'AdressRowId'; + protected static string $primaryField = 'AdressRowId'; } diff --git a/Interfaces/GSD/Model/GSDArticleMapper.php b/Interfaces/GSD/Model/GSDArticleMapper.php index db3bf6c..944def0 100644 --- a/Interfaces/GSD/Model/GSDArticleMapper.php +++ b/Interfaces/GSD/Model/GSDArticleMapper.php @@ -32,7 +32,7 @@ final class GSDArticleMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], @@ -48,7 +48,7 @@ final class GSDArticleMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'Artikel'; + protected static string $table = 'Artikel'; /** * Created at. @@ -56,7 +56,7 @@ final class GSDArticleMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'row_create_time'; + protected static string $createdAt = 'row_create_time'; /** * Primary field name. @@ -64,5 +64,5 @@ final class GSDArticleMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'row_id'; + protected static string $primaryField = 'row_id'; } diff --git a/Interfaces/GSD/Model/GSDCostCenter.php b/Interfaces/GSD/Model/GSDCostCenter.php index 3860450..f78aafd 100644 --- a/Interfaces/GSD/Model/GSDCostCenter.php +++ b/Interfaces/GSD/Model/GSDCostCenter.php @@ -44,7 +44,7 @@ final class GSDCostCenter implements \JsonSerializable /** * Created. * - * @var \DateTime + * @var null|\DateTime * @since 1.0.0 */ protected $createdAt = null; diff --git a/Interfaces/GSD/Model/GSDCostCenterMapper.php b/Interfaces/GSD/Model/GSDCostCenterMapper.php index a981983..ca21621 100644 --- a/Interfaces/GSD/Model/GSDCostCenterMapper.php +++ b/Interfaces/GSD/Model/GSDCostCenterMapper.php @@ -33,7 +33,7 @@ final class GSDCostCenterMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], @@ -47,7 +47,7 @@ final class GSDCostCenterMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'FiKostenstellen'; + protected static string $table = 'FiKostenstellen'; /** * Created at. @@ -55,7 +55,7 @@ final class GSDCostCenterMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'row_create_time'; + protected static string $createdAt = 'row_create_time'; /** * Primary field name. @@ -63,5 +63,5 @@ final class GSDCostCenterMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'ROW_ID'; + protected static string $primaryField = 'ROW_ID'; } diff --git a/Interfaces/GSD/Model/GSDCostObject.php b/Interfaces/GSD/Model/GSDCostObject.php index cd6f8e8..3ebe435 100644 --- a/Interfaces/GSD/Model/GSDCostObject.php +++ b/Interfaces/GSD/Model/GSDCostObject.php @@ -44,7 +44,7 @@ final class GSDCostObject implements \JsonSerializable /** * Created. * - * @var \DateTime + * @var null|\DateTime * @since 1.0.0 */ protected $createdAt = null; diff --git a/Interfaces/GSD/Model/GSDCostObjectMapper.php b/Interfaces/GSD/Model/GSDCostObjectMapper.php index 433dc1e..d45c2ff 100644 --- a/Interfaces/GSD/Model/GSDCostObjectMapper.php +++ b/Interfaces/GSD/Model/GSDCostObjectMapper.php @@ -33,7 +33,7 @@ final class GSDCostObjectMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], @@ -47,7 +47,7 @@ final class GSDCostObjectMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'FiKostentraeger'; + protected static string $table = 'FiKostentraeger'; /** * Created at. @@ -55,7 +55,7 @@ final class GSDCostObjectMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'row_create_time'; + protected static string $createdAt = 'row_create_time'; /** * Primary field name. @@ -63,5 +63,5 @@ final class GSDCostObjectMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'ROW_ID'; + protected static string $primaryField = 'ROW_ID'; } diff --git a/Interfaces/GSD/Model/GSDCustomerMapper.php b/Interfaces/GSD/Model/GSDCustomerMapper.php index 0932c08..84e04f6 100644 --- a/Interfaces/GSD/Model/GSDCustomerMapper.php +++ b/Interfaces/GSD/Model/GSDCustomerMapper.php @@ -32,14 +32,14 @@ final class GSDCustomerMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], 'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'], ]; - protected static $ownsOne = [ + protected static array $ownsOne = [ 'mainAddress' => [ 'mapper' => GSDAddressMapper::class, 'src' => 'AddressId', @@ -52,7 +52,7 @@ final class GSDCustomerMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'Kunden'; + protected static string $table = 'Kunden'; /** * Created at. @@ -60,7 +60,7 @@ final class GSDCustomerMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'row_create_time'; + protected static string $createdAt = 'row_create_time'; /** * Primary field name. @@ -68,5 +68,5 @@ final class GSDCustomerMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'row_id'; + protected static string $primaryField = 'row_id'; } diff --git a/Models/InterfaceManagerMapper.php b/Models/InterfaceManagerMapper.php index 3774f55..8f61fab 100644 --- a/Models/InterfaceManagerMapper.php +++ b/Models/InterfaceManagerMapper.php @@ -33,7 +33,7 @@ final class InterfaceManagerMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $columns = [ + protected static array $columns = [ 'exchange_id' => ['name' => 'exchange_id', 'type' => 'int', 'internal' => 'id'], 'exchange_title' => ['name' => 'exchange_title', 'type' => 'string', 'internal' => 'info/name'], 'exchange_path' => ['name' => 'exchange_path', 'type' => 'string', 'internal' => 'info/path'], @@ -49,7 +49,7 @@ final class InterfaceManagerMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'exchange'; + protected static string $table = 'exchange'; /** * Primary field name. @@ -57,5 +57,5 @@ final class InterfaceManagerMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'exchange_id'; + protected static string $primaryField = 'exchange_id'; }