mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-02 17:28:40 +00:00
Implement php 7.4 type hints
This commit is contained in:
parent
297cd0d87f
commit
5746dd3c6e
|
|
@ -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 = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ final class AddressMapper extends DataMapperAbstract
|
|||
* @var array<string, array<string, bool|string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
protected static array $columns = [
|
||||
'profile_address_id' => ['name' => 'profile_address_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'profile_address_type' => ['name' => 'profile_address_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'profile_address_address' => ['name' => 'profile_address_address', 'type' => 'string', 'internal' => 'address'],
|
||||
|
|
@ -48,7 +48,7 @@ final class AddressMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $table = 'profile_address';
|
||||
protected static string $table = 'profile_address';
|
||||
|
||||
/**
|
||||
* Primary field name.
|
||||
|
|
@ -56,5 +56,5 @@ final class AddressMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'profile_address_id';
|
||||
protected static string $primaryField = 'profile_address_id';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final class ContactElementMapper extends DataMapperAbstract
|
|||
* @var array<string, array<string, bool|string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
protected static array $columns = [
|
||||
'profile_contact_id' => ['name' => 'profile_contact_id', 'type' => 'int', 'internal' => 'id'],
|
||||
];
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ final class ContactElementMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $table = 'profile_contact';
|
||||
protected static string $table = 'profile_contact';
|
||||
|
||||
/**
|
||||
* Primary field name.
|
||||
|
|
@ -42,5 +42,5 @@ final class ContactElementMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'profile_contact_id';
|
||||
protected static string $primaryField = 'profile_contact_id';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class Profile implements \JsonSerializable
|
|||
/**
|
||||
* Birthday.
|
||||
*
|
||||
* @var \DateTime
|
||||
* @var null|\DateTime
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $birthday = null;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class ProfileMapper extends DataMapperAbstract
|
|||
* @var array<string, array<string, bool|string|array>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
protected static array $columns = [
|
||||
'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_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>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $ownsOne = [
|
||||
protected static array $ownsOne = [
|
||||
'account' => [
|
||||
'mapper' => AccountMapper::class,
|
||||
'src' => 'profile_account_account',
|
||||
|
|
@ -64,7 +64,7 @@ final class ProfileMapper extends DataMapperAbstract
|
|||
* @var array<string, array<string, null|string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $hasMany = [
|
||||
protected static array $hasMany = [
|
||||
'location' => [
|
||||
'mapper' => AddressMapper::class,
|
||||
'table' => 'profile_address',
|
||||
|
|
@ -79,7 +79,7 @@ final class ProfileMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $table = 'profile_account';
|
||||
protected static string $table = 'profile_account';
|
||||
|
||||
/**
|
||||
* Primary field name.
|
||||
|
|
@ -87,5 +87,5 @@ final class ProfileMapper extends DataMapperAbstract
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'profile_account_id';
|
||||
protected static string $primaryField = 'profile_account_id';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user