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