mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-07 13:08:42 +00:00
Implement php 7.4 type hints
This commit is contained in:
parent
18647aa1ed
commit
bf75752b24
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class CollectionMapper extends MediaMapper
|
|||
* @var array<string, array<string, null|string>>
|
||||
* @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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Media implements \JsonSerializable
|
|||
/**
|
||||
* Uploaded.
|
||||
*
|
||||
* @var \DateTime
|
||||
* @var null|\DateTime
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $createdAt = null;
|
||||
|
|
|
|||
|
|
@ -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<string, array<string, string>>
|
||||
* @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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user