for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Apps\Controller\Admin;
use Apps\Model\Admin\Newcomment\FormSettings;
use Extend\Core\Arch\AdminController;
use Ffcms\Core\App;
/**
* Class Newcomment. Controller of widget admin part
* @package Apps\Controller\Admin
*/
class Newcomment extends AdminController
{
const VERSION = '1.0.1';
public $type = 'widget';
* Show widget new comments settings
* @return string
* @throws \Ffcms\Core\Exception\SyntaxException
public function actionIndex(): ?string
$model = new FormSettings($this->getConfigs());
if ($model->send() && $model->validate()) {
$this->setConfigs($model->getAllProperties());
$model->getAllProperties()
Ffcms\Core\Arch\Model::getAllProperties()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
App::$Session->getFlashBag()->add('success', __('Settings is successful updated'));
}
return $this->view->render('newcomment/index', [
'model' => $model
]);
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.