for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Controllers;
use App\Models\CategoryModel;
use Core\Controller;
use Core\Container;
class Tag extends Controller{
protected $siteConfig;
public function __construct(Container $container)
{
$this->loadModules[] = 'SiteConfig';
parent::__construct($container);
}
public function posts($tagId)
$tagId
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function posts(/** @scrutinizer ignore-unused */ $tagId)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$categoryModel = new CategoryModel($this->container);
$this->sendSessionVars();
$this->data['configs'] = $this->siteConfig->getSiteConfig();
$this->data['navigation'] = $categoryModel->getMenu();
$this->renderView('Tag');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.