diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 151146b..f87d6b3 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -74,7 +74,7 @@ final class BackendController extends Controller * @var string[] * @since 1.0.0 */ - protected static $providing = []; + protected static array $providing = []; /** * Dependencies. @@ -82,7 +82,7 @@ final class BackendController extends Controller * @var string[] * @since 1.0.0 */ - protected static $dependencies = []; + protected static array $dependencies = []; /** * @param RequestAbstract $request Request diff --git a/Controller/Controller.php b/Controller/Controller.php index 24ca383..d5c5026 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/Models/CollectionMapper.php b/Models/CollectionMapper.php index 3a65377..718500d 100644 --- a/Models/CollectionMapper.php +++ b/Models/CollectionMapper.php @@ -30,7 +30,7 @@ final class CollectionMapper extends MediaMapper * @var array> * @since 1.0.0 */ - protected static $hasMany = [ + protected static array $hasMany = [ 'sources' => [ 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'media_relation', /* table of the related object, null if no relation table is used (many->1) */ @@ -45,7 +45,7 @@ final class CollectionMapper extends MediaMapper * @var string * @since 1.0.0 */ - protected static $table = 'media'; + protected static string $table = 'media'; /** * Created at. @@ -53,7 +53,7 @@ final class CollectionMapper extends MediaMapper * @var string * @since 1.0.0 */ - protected static $createdAt = 'media_created_at'; + protected static string $createdAt = 'media_created_at'; /** * Primary field name. @@ -61,5 +61,5 @@ final class CollectionMapper extends MediaMapper * @var string * @since 1.0.0 */ - protected static $primaryField = 'media_id'; + protected static string $primaryField = 'media_id'; } diff --git a/Models/Media.php b/Models/Media.php index 2584aec..7792d8c 100644 --- a/Models/Media.php +++ b/Models/Media.php @@ -68,7 +68,7 @@ class Media implements \JsonSerializable /** * Uploaded. * - * @var \DateTime + * @var null|\DateTime * @since 1.0.0 */ protected $createdAt = null; diff --git a/Models/MediaMapper.php b/Models/MediaMapper.php index be36300..b97f7e3 100644 --- a/Models/MediaMapper.php +++ b/Models/MediaMapper.php @@ -35,7 +35,7 @@ class MediaMapper extends DataMapperAbstract * @since 1.0.0 * @todo: maybe add file name for searching by file name (path in media_file should not matter for search) */ - protected static $columns = [ + protected static array $columns = [ 'media_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'], 'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true], @@ -56,7 +56,7 @@ class MediaMapper extends DataMapperAbstract * @var array> * @since 1.0.0 */ - protected static $belongsTo = [ + protected static array $belongsTo = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'dest' => 'media_created_by', @@ -69,7 +69,7 @@ class MediaMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $table = 'media'; + protected static string $table = 'media'; /** * Created at. @@ -77,7 +77,7 @@ class MediaMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $createdAt = 'media_created_at'; + protected static string $createdAt = 'media_created_at'; /** * Primary field name. @@ -85,7 +85,7 @@ class MediaMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static $primaryField = 'media_id'; + protected static string $primaryField = 'media_id'; /** * Get media based on virtual path.