1 | <?php |
||
2 | |||
3 | namespace Apps\Controller\Admin; |
||
4 | |||
5 | use Apps\Model\Admin\Newcomment\FormSettings; |
||
6 | use Extend\Core\Arch\AdminController; |
||
7 | use Ffcms\Core\App; |
||
8 | |||
9 | /** |
||
10 | * Class Newcomment. Controller of widget admin part |
||
11 | * @package Apps\Controller\Admin |
||
12 | */ |
||
13 | class Newcomment extends AdminController |
||
14 | { |
||
15 | const VERSION = '1.0.1'; |
||
16 | |||
17 | public $type = 'widget'; |
||
18 | |||
19 | /** |
||
20 | * Show widget new comments settings |
||
21 | * @return string |
||
22 | * @throws \Ffcms\Core\Exception\SyntaxException |
||
23 | */ |
||
24 | public function actionIndex(): ?string |
||
25 | { |
||
26 | $model = new FormSettings($this->getConfigs()); |
||
27 | |||
28 | if ($model->send() && $model->validate()) { |
||
29 | $this->setConfigs($model->getAllProperties()); |
||
0 ignored issues
–
show
|
|||
30 | App::$Session->getFlashBag()->add('success', __('Settings is successful updated')); |
||
31 | } |
||
32 | |||
33 | return $this->view->render('newcomment/index', [ |
||
34 | 'model' => $model |
||
35 | ]); |
||
36 | } |
||
37 | } |
||
38 |
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.