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\Contenttag\FormSettings;
use Extend\Core\Arch\AdminController;
use Ffcms\Core\App;
/**
* Class Contenttag. Admin controller of widget content tags
* @package Apps\Controller\Admin
*/
class Contenttag extends AdminController
{
const VERSION = '1.0.1';
public $type = 'widget';
* Show and edit widget settings
* @return string
* @throws \Ffcms\Core\Exception\SyntaxException
public function actionIndex()
// initialize model and pass configs as arg
$model = new FormSettings($this->getConfigs());
// check if form of depend model is submited
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'));
}
// render view output
return $this->view->render('contenttag/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.