Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function actionIndex() |
||
25 | { |
||
26 | // initialize model and pass configs inside |
||
27 | $model = new FormSettings($this->getConfigs()); |
||
28 | |||
29 | // check if submit request is sended |
||
30 | if ($model->send()) { |
||
31 | if ($model->validate()) { |
||
32 | // save configurations |
||
33 | $this->setConfigs($model->getAllProperties()); |
||
|
|||
34 | App::$Session->getFlashBag()->add('success', __('Settings is successful updated')); |
||
35 | $this->response->redirect('search/index'); |
||
36 | } else { |
||
37 | App::$Session->getFlashBag()->add('error', __('Form validation is failed')); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | // render output view |
||
42 | return $this->view->render('search/settings', [ |
||
43 | 'model' => $model |
||
44 | ]); |
||
47 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.