Implement php 7.4 type hints

This commit is contained in:
Dennis Eichhorn 2019-08-15 21:55:12 +02:00
parent 297cd0d87f
commit 5746dd3c6e
5 changed files with 14 additions and 14 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 = [];
/** /**
* Dependencies. * Dependencies.
@ -74,5 +74,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

@ -32,7 +32,7 @@ final class AddressMapper 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 = [
'profile_address_id' => ['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'], 'profile_address_id' => ['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'],
'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'], 'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'],
'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'], 'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'],
@ -48,7 +48,7 @@ final class AddressMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'profile_address'; protected static string $table = 'profile_address';
/** /**
* Primary field name. * Primary field name.
@ -56,5 +56,5 @@ final class AddressMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'profile_address_id'; protected static string $primaryField = 'profile_address_id';
} }

View File

@ -24,7 +24,7 @@ final class ContactElementMapper 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 = [
'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'], 'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'],
]; ];
@ -34,7 +34,7 @@ final class ContactElementMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'profile_contact'; protected static string $table = 'profile_contact';
/** /**
* Primary field name. * Primary field name.
@ -42,5 +42,5 @@ final class ContactElementMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'profile_contact_id'; protected static string $primaryField = 'profile_contact_id';
} }

View File

@ -50,7 +50,7 @@ class Profile implements \JsonSerializable
/** /**
* Birthday. * Birthday.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
private $birthday = null; private $birthday = null;

View File

@ -34,7 +34,7 @@ final class ProfileMapper extends DataMapperAbstract
* @var array<string, array<string, bool|string|array>> * @var array<string, array<string, bool|string|array>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $columns = [ protected static array $columns = [
'profile_account_id' => ['name' => 'profile_account_id', 'type' => 'int', 'internal' => 'id'], 'profile_account_id' => ['name' => 'profile_account_id', 'type' => 'int', 'internal' => 'id'],
'profile_account_image' => ['name' => 'profile_account_image', 'type' => 'int', 'internal' => 'image', 'annotations' => ['gdpr' => true]], 'profile_account_image' => ['name' => 'profile_account_image', 'type' => 'int', 'internal' => 'image', 'annotations' => ['gdpr' => true]],
'profile_account_birthday' => ['name' => 'profile_account_birthday', 'type' => 'DateTime', 'internal' => 'birthday', 'annotations' => ['gdpr' => true]], 'profile_account_birthday' => ['name' => 'profile_account_birthday', 'type' => 'DateTime', 'internal' => 'birthday', 'annotations' => ['gdpr' => true]],
@ -47,7 +47,7 @@ final class ProfileMapper 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 = [
'account' => [ 'account' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'src' => 'profile_account_account', 'src' => 'profile_account_account',
@ -64,7 +64,7 @@ final class ProfileMapper 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 = [
'location' => [ 'location' => [
'mapper' => AddressMapper::class, 'mapper' => AddressMapper::class,
'table' => 'profile_address', 'table' => 'profile_address',
@ -79,7 +79,7 @@ final class ProfileMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'profile_account'; protected static string $table = 'profile_account';
/** /**
* Primary field name. * Primary field name.
@ -87,5 +87,5 @@ final class ProfileMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'profile_account_id'; protected static string $primaryField = 'profile_account_id';
} }