mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-17 16:28:41 +00:00
Implement php 7.4 type hints
This commit is contained in:
parent
33877c2fd0
commit
bf3b7fbef1
|
|
@ -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 = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ final class QAAnswerMapper 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 = [
|
||||||
'qa_answer_id' => ['name' => 'qa_answer_id', 'type' => 'int', 'internal' => 'id'],
|
'qa_answer_id' => ['name' => 'qa_answer_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'qa_answer_answer' => ['name' => 'qa_answer_answer', 'type' => 'string', 'internal' => 'answer'],
|
'qa_answer_answer' => ['name' => 'qa_answer_answer', 'type' => 'string', 'internal' => 'answer'],
|
||||||
'qa_answer_question' => ['name' => 'qa_answer_question', 'type' => 'int', 'internal' => 'question'],
|
'qa_answer_question' => ['name' => 'qa_answer_question', 'type' => 'int', 'internal' => 'question'],
|
||||||
|
|
@ -50,7 +50,7 @@ final class QAAnswerMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'qa_answer';
|
protected static string $table = 'qa_answer';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
|
|
@ -58,7 +58,7 @@ final class QAAnswerMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'qa_answer_created_at';
|
protected static string $createdAt = 'qa_answer_created_at';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
|
|
@ -66,7 +66,7 @@ final class QAAnswerMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'qa_answer_id';
|
protected static string $primaryField = 'qa_answer_id';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
|
|
@ -74,7 +74,7 @@ final class QAAnswerMapper 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' => ProfileMapper::class,
|
'mapper' => ProfileMapper::class,
|
||||||
'dest' => 'qa_answer_created_by',
|
'dest' => 'qa_answer_created_by',
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ final class QACategoryMapper 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 = [
|
||||||
'qa_category_id' => ['name' => 'qa_category_id', 'type' => 'int', 'internal' => 'id'],
|
'qa_category_id' => ['name' => 'qa_category_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'qa_category_name' => ['name' => 'qa_category_name', 'type' => 'string', 'internal' => 'name'],
|
'qa_category_name' => ['name' => 'qa_category_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'qa_category_parent' => ['name' => 'qa_category_parent', 'type' => 'int', 'internal' => 'parent'],
|
'qa_category_parent' => ['name' => 'qa_category_parent', 'type' => 'int', 'internal' => 'parent'],
|
||||||
|
|
@ -45,7 +45,7 @@ final class QACategoryMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'qa_category';
|
protected static string $table = 'qa_category';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
|
|
@ -53,5 +53,5 @@ final class QACategoryMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'qa_category_id';
|
protected static string $primaryField = 'qa_category_id';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ final class QAQuestionMapper 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 = [
|
||||||
'qa_question_id' => ['name' => 'qa_question_id', 'type' => 'int', 'internal' => 'id'],
|
'qa_question_id' => ['name' => 'qa_question_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'qa_question_title' => ['name' => 'qa_question_title', 'type' => 'string', 'internal' => 'name'],
|
'qa_question_title' => ['name' => 'qa_question_title', 'type' => 'string', 'internal' => 'name'],
|
||||||
'qa_question_language' => ['name' => 'qa_question_language', 'type' => 'string', 'internal' => 'language'],
|
'qa_question_language' => ['name' => 'qa_question_language', 'type' => 'string', 'internal' => 'language'],
|
||||||
|
|
@ -51,7 +51,7 @@ final class QAQuestionMapper 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 = [
|
||||||
'answers' => [
|
'answers' => [
|
||||||
'mapper' => QAAnswerMapper::class,
|
'mapper' => QAAnswerMapper::class,
|
||||||
'table' => 'qa_answer',
|
'table' => 'qa_answer',
|
||||||
|
|
@ -66,7 +66,7 @@ final class QAQuestionMapper 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 $ownsOne = [
|
protected static array $ownsOne = [
|
||||||
'category' => [
|
'category' => [
|
||||||
'mapper' => QACategoryMapper::class,
|
'mapper' => QACategoryMapper::class,
|
||||||
'dst' => 'qa_question_category',
|
'dst' => 'qa_question_category',
|
||||||
|
|
@ -79,7 +79,7 @@ final class QAQuestionMapper 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' => ProfileMapper::class,
|
'mapper' => ProfileMapper::class,
|
||||||
'dest' => 'qa_question_created_by',
|
'dest' => 'qa_question_created_by',
|
||||||
|
|
@ -92,7 +92,7 @@ final class QAQuestionMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'qa_question';
|
protected static string $table = 'qa_question';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
|
|
@ -100,7 +100,7 @@ final class QAQuestionMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'qa_question_created_at';
|
protected static string $createdAt = 'qa_question_created_at';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
|
|
@ -108,5 +108,5 @@ final class QAQuestionMapper extends DataMapperAbstract
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'qa_question_id';
|
protected static string $primaryField = 'qa_question_id';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user