mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-17 01:38:41 +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[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $providing = [];
|
protected static array $providing = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dependencies.
|
* Dependencies.
|
||||||
|
|
@ -82,7 +82,7 @@ final class BackendController extends Controller
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $dependencies = [];
|
protected static array $dependencies = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
|
|
|
||||||
|
|
@ -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 = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ final class CollectionMapper extends MediaMapper
|
||||||
* @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 = [
|
||||||
'sources' => [
|
'sources' => [
|
||||||
'mapper' => MediaMapper::class, /* mapper of the related object */
|
'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) */
|
'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
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'media';
|
protected static string $table = 'media';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
|
|
@ -53,7 +53,7 @@ final class CollectionMapper extends MediaMapper
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'media_created_at';
|
protected static string $createdAt = 'media_created_at';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
|
|
@ -61,5 +61,5 @@ final class CollectionMapper extends MediaMapper
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'media_id';
|
protected static string $primaryField = 'media_id';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class Media implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Uploaded.
|
* Uploaded.
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var null|\DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $createdAt = null;
|
protected $createdAt = null;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @todo: maybe add file name for searching by file name (path in media_file should not matter for search)
|
* @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_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
||||||
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', '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>>
|
* @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,
|
||||||
'dest' => 'media_created_by',
|
'dest' => 'media_created_by',
|
||||||
|
|
@ -69,7 +69,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'media';
|
protected static string $table = 'media';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
|
|
@ -77,7 +77,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'media_created_at';
|
protected static string $createdAt = 'media_created_at';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
|
|
@ -85,7 +85,7 @@ class MediaMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'media_id';
|
protected static string $primaryField = 'media_id';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get media based on virtual path.
|
* Get media based on virtual path.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user