Implement php 7.4 type hints

This commit is contained in:
Dennis Eichhorn 2019-08-15 21:55:12 +02:00
parent 093f0b7926
commit 246fa2ee91
3 changed files with 9 additions and 9 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

@ -88,7 +88,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
/** /**
* Created. * Created.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
private $createdAt = null; private $createdAt = null;
@ -104,7 +104,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
/** /**
* Publish. * Publish.
* *
* @var \DateTime * @var null|\DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
private $publish = null; private $publish = null;

View File

@ -34,7 +34,7 @@ final class NewsArticleMapper 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 = [
'news_id' => ['name' => 'news_id', 'type' => 'int', 'internal' => 'id'], 'news_id' => ['name' => 'news_id', 'type' => 'int', 'internal' => 'id'],
'news_created_by' => ['name' => 'news_created_by', 'type' => 'int', 'internal' => 'createdBy'], 'news_created_by' => ['name' => 'news_created_by', 'type' => 'int', 'internal' => 'createdBy'],
'news_publish' => ['name' => 'news_publish', 'type' => 'DateTime', 'internal' => 'publish'], 'news_publish' => ['name' => 'news_publish', 'type' => 'DateTime', 'internal' => 'publish'],
@ -54,7 +54,7 @@ final class NewsArticleMapper 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' => 'news_created_by', 'src' => 'news_created_by',
@ -67,7 +67,7 @@ final class NewsArticleMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $table = 'news'; protected static string $table = 'news';
/** /**
* Primary field name. * Primary field name.
@ -75,7 +75,7 @@ final class NewsArticleMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $primaryField = 'news_id'; protected static string $primaryField = 'news_id';
/** /**
* Created at. * Created at.
@ -83,5 +83,5 @@ final class NewsArticleMapper extends DataMapperAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $createdAt = 'news_created_at'; protected static string $createdAt = 'news_created_at';
} }