Implement php 7.4 type hints

This commit is contained in:
Dennis Eichhorn 2019-08-15 21:55:12 +02:00
parent 47490e9cba
commit 8a366a199c
3 changed files with 11 additions and 11 deletions

View File

@ -67,7 +67,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.
@ -75,5 +75,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

@ -27,7 +27,7 @@ final class EmployeeHistoryMapper 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 = [
'hr_staff_history_id' => ['name' => 'hr_staff_history_id', 'type' => 'int', 'internal' => 'id'], 'hr_staff_history_id' => ['name' => 'hr_staff_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_history_staff' => ['name' => 'hr_staff_history_staff', 'type' => 'int', 'internal' => 'employee'], 'hr_staff_history_staff' => ['name' => 'hr_staff_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_history_unit' => ['name' => 'hr_staff_history_unit', 'type' => 'int', 'internal' => 'unit'], 'hr_staff_history_unit' => ['name' => 'hr_staff_history_unit', 'type' => 'int', 'internal' => 'unit'],
@ -43,7 +43,7 @@ final class EmployeeHistoryMapper 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 = [
'unit' => [ 'unit' => [
'mapper' => UnitMapper::class, 'mapper' => UnitMapper::class,
'src' => 'hr_staff_history_unit', 'src' => 'hr_staff_history_unit',
@ -64,7 +64,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'hr_staff_history_id'; protected static string $primaryField = 'hr_staff_history_id';
/** /**
* Primary table. * Primary table.
@ -72,5 +72,5 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'hr_staff_history'; protected static string $table = 'hr_staff_history';
} }

View File

@ -26,7 +26,7 @@ final class EmployeeMapper 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 = [
'hr_staff_id' => ['name' => 'hr_staff_id', 'type' => 'int', 'internal' => 'id'], 'hr_staff_id' => ['name' => 'hr_staff_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_account' => ['name' => 'hr_staff_account', 'type' => 'int', 'internal' => 'account'], 'hr_staff_account' => ['name' => 'hr_staff_account', 'type' => 'int', 'internal' => 'account'],
]; ];
@ -37,7 +37,7 @@ final class EmployeeMapper 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 = [
'account' => [ 'account' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'src' => 'hr_staff_account', 'src' => 'hr_staff_account',
@ -50,7 +50,7 @@ final class EmployeeMapper 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 = [
'history' => [ 'history' => [
'mapper' => EmployeeHistoryMapper::class, 'mapper' => EmployeeHistoryMapper::class,
'table' => 'hr_staff_history', 'table' => 'hr_staff_history',
@ -65,7 +65,7 @@ final class EmployeeMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'hr_staff'; protected static string $table = 'hr_staff';
/** /**
* Primary field name. * Primary field name.
@ -73,5 +73,5 @@ final class EmployeeMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'hr_staff_id'; protected static string $primaryField = 'hr_staff_id';
} }