for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the `tvi/monitor-bundle` project.
*
* (c) https://github.com/turnaev/monitor-bundle/graphs/contributors
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace Tvi\MonitorBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Tvi\MonitorBundle\Runner\RunnerManager;
class UIController extends Controller
{
* @var RunnerManager
protected $runnerManager;
public function __construct(RunnerManager $runnerManager)
$this->runnerManager = $runnerManager;
}
$request
$group
* @return \Symfony\Component\HttpFoundation\Response
public function indexAction(Request $request, ?string $group = null)
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function indexAction(/** @scrutinizer ignore-unused */ Request $request, ?string $group = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$groups = $this->runnerManager->findGroups();
$checks = $this->runnerManager->findChecks($group);
return $this->render('@TviMonitor/ui/index.html.twig', [
'groups' => $groups,
'checks' => $checks,
]
);