mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-15 15:28:42 +00:00
automated phpcs fixes
This commit is contained in:
parent
4bc569d47a
commit
bf783c9986
|
|
@ -173,7 +173,7 @@ final class Application
|
||||||
$head = new Head();
|
$head = new Head();
|
||||||
|
|
||||||
$pageView->setData('unitId', $this->app->unitId);
|
$pageView->setData('unitId', $this->app->unitId);
|
||||||
$pageView->data['head'] = $head;
|
$pageView->head = $head;
|
||||||
$response->set('Content', $pageView);
|
$response->set('Content', $pageView);
|
||||||
|
|
||||||
/* App only allows GET */
|
/* App only allows GET */
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateQAQuestionCreate($request))) {
|
if (!empty($val = $this->validateQAQuestionCreate($request))) {
|
||||||
$response->data['qa_question_create'] = new FormValidation($val);
|
$response->data['qa_question_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -239,7 +239,7 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateQAAnswerCreate($request))) {
|
if (!empty($val = $this->validateQAAnswerCreate($request))) {
|
||||||
$response->data['qa_answer_create'] = new FormValidation($val);
|
$response->data['qa_answer_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -394,7 +394,7 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateQAAppCreate($request))) {
|
if (!empty($val = $this->validateQAAppCreate($request))) {
|
||||||
$response->data['qa_app_create'] = new FormValidation($val);
|
$response->data['qa_app_create'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -459,7 +459,7 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateQuestionVote($request))) {
|
if (!empty($val = $this->validateQuestionVote($request))) {
|
||||||
$response->data['qa_question_vote'] = new FormValidation($val);
|
$response->data['qa_question_vote'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -534,7 +534,7 @@ final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateAnswerVote($request))) {
|
if (!empty($val = $this->validateAnswerVote($request))) {
|
||||||
$response->data['qa_answer_vote'] = new FormValidation($val);
|
$response->data['qa_answer_vote'] = new FormValidation($val);
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
$response->header->status = RequestStatusCode::R_400;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ final class BackendController extends Controller
|
||||||
$view->data['questions'] = $list;
|
$view->data['questions'] = $list;
|
||||||
|
|
||||||
/** @var \Modules\QA\Models\QAApp[] $apps */
|
/** @var \Modules\QA\Models\QAApp[] $apps */
|
||||||
$apps = QAAppMapper::getAll()->execute();
|
$apps = QAAppMapper::getAll()->execute();
|
||||||
$view->data['apps'] = $apps;
|
$view->data['apps'] = $apps;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -129,7 +129,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->data['question'] = $question;
|
$view->data['question'] = $question;
|
||||||
|
|
||||||
$scores = QAHelperMapper::getAccountScore($question->getAccounts());
|
$scores = QAHelperMapper::getAccountScore($question->getAccounts());
|
||||||
$view->data['scores'] = $scores;
|
$view->data['scores'] = $scores;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -154,7 +154,7 @@ final class BackendController extends Controller
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response);
|
||||||
|
|
||||||
/** @var \Modules\QA\Models\QAQuestion $question */
|
/** @var \Modules\QA\Models\QAQuestion $question */
|
||||||
$question = QAQuestionMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$question = QAQuestionMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||||
$view->data['question'] = $question;
|
$view->data['question'] = $question;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
@ -173,17 +173,17 @@ final class BackendController extends Controller
|
||||||
*/
|
*/
|
||||||
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response);
|
||||||
|
|
||||||
$id = $request->getDataString('id') ?? '';
|
$id = $request->getDataString('id') ?? '';
|
||||||
|
|
||||||
/** @var \Model\Setting[] $settings */
|
/** @var \Model\Setting[] $settings */
|
||||||
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
$settings = SettingMapper::getAll()->where('module', $id)->execute();
|
||||||
$view->data['settings'] = $settings;
|
$view->data['settings'] = $settings;
|
||||||
|
|
||||||
/** @var \Modules\QA\Models\QAApp[] $apps */
|
/** @var \Modules\QA\Models\QAApp[] $apps */
|
||||||
$apps = QAAppMapper::getAll()->execute();
|
$apps = QAAppMapper::getAll()->execute();
|
||||||
$view->data['apps'] = $apps;
|
$view->data['apps'] = $apps;
|
||||||
|
|
||||||
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings');
|
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user