mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-12 22:08:41 +00:00
Automated formatting changes
This commit is contained in:
parent
7e7243b95c
commit
60a81b6908
|
|
@ -89,10 +89,10 @@ final class ApiController extends Controller
|
|||
{
|
||||
$mardkownParser = new Markdown();
|
||||
|
||||
$question = new QAQuestion();
|
||||
$question->name = (string) $request->getData('title');
|
||||
$question = new QAQuestion();
|
||||
$question->name = (string) $request->getData('title');
|
||||
$question->questionRaw = (string) $request->getData('plain');
|
||||
$question->question = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||
$question->question = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||
$question->setLanguage((string) $request->getData('language'));
|
||||
$question->setCategory(new NullQACategory((int) $request->getData('category')));
|
||||
$question->setStatus((int) $request->getData('status'));
|
||||
|
|
@ -185,10 +185,10 @@ final class ApiController extends Controller
|
|||
{
|
||||
$mardkownParser = new Markdown();
|
||||
|
||||
$answer = new QAAnswer();
|
||||
$answer = new QAAnswer();
|
||||
$answer->answerRaw = (string) $request->getData('plain');
|
||||
$answer->answer = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||
$answer->question = new NullQAQuestion((int) $request->getData('question'));
|
||||
$answer->answer = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||
$answer->question = new NullQAQuestion((int) $request->getData('question'));
|
||||
$answer->setStatus((int) $request->getData('status'));
|
||||
$answer->createdBy = new NullAccount($request->header->account);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ final class QAAnswerMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
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_raw' => ['name' => 'qa_answer_answer_raw', 'type' => 'string', 'internal' => 'answerRaw'],
|
||||
'qa_answer_answer' => ['name' => 'qa_answer_answer', 'type' => 'string', 'internal' => 'answer'],
|
||||
'qa_answer_question' => ['name' => 'qa_answer_question', 'type' => 'int', 'internal' => 'question'],
|
||||
'qa_answer_status' => ['name' => 'qa_answer_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'qa_answer_accepted' => ['name' => 'qa_answer_accepted', 'type' => 'bool', 'internal' => 'isAccepted'],
|
||||
'qa_answer_created_by' => ['name' => 'qa_answer_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||
'qa_answer_created_at' => ['name' => 'qa_answer_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||
'qa_answer_answer' => ['name' => 'qa_answer_answer', 'type' => 'string', 'internal' => 'answer'],
|
||||
'qa_answer_question' => ['name' => 'qa_answer_question', 'type' => 'int', 'internal' => 'question'],
|
||||
'qa_answer_status' => ['name' => 'qa_answer_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'qa_answer_accepted' => ['name' => 'qa_answer_accepted', 'type' => 'bool', 'internal' => 'isAccepted'],
|
||||
'qa_answer_created_by' => ['name' => 'qa_answer_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||
'qa_answer_created_at' => ['name' => 'qa_answer_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -35,15 +35,15 @@ final class QAQuestionMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $columns = [
|
||||
'qa_question_id' => ['name' => 'qa_question_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'qa_question_title' => ['name' => 'qa_question_title', 'type' => 'string', 'internal' => 'name'],
|
||||
'qa_question_language' => ['name' => 'qa_question_language', 'type' => 'string', 'internal' => 'language'],
|
||||
'qa_question_question' => ['name' => 'qa_question_question', 'type' => 'string', 'internal' => 'question'],
|
||||
'qa_question_id' => ['name' => 'qa_question_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'qa_question_title' => ['name' => 'qa_question_title', 'type' => 'string', 'internal' => 'name'],
|
||||
'qa_question_language' => ['name' => 'qa_question_language', 'type' => 'string', 'internal' => 'language'],
|
||||
'qa_question_question' => ['name' => 'qa_question_question', 'type' => 'string', 'internal' => 'question'],
|
||||
'qa_question_question_raw' => ['name' => 'qa_question_question_raw', 'type' => 'string', 'internal' => 'questionRaw'],
|
||||
'qa_question_status' => ['name' => 'qa_question_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'qa_question_category' => ['name' => 'qa_question_category', 'type' => 'int', 'internal' => 'category'],
|
||||
'qa_question_created_by' => ['name' => 'qa_question_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||
'qa_question_created_at' => ['name' => 'qa_question_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||
'qa_question_status' => ['name' => 'qa_question_status', 'type' => 'int', 'internal' => 'status'],
|
||||
'qa_question_category' => ['name' => 'qa_question_category', 'type' => 'int', 'internal' => 'category'],
|
||||
'qa_question_created_by' => ['name' => 'qa_question_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||
'qa_question_created_at' => ['name' => 'qa_question_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user