for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Drupal\qa\Controller;
use Drupal\Core\Controller\ControllerBase;
/**
* Class VariablesReportController.
*/
class VariablesReportController extends ControllerBase {
* Action.
*
* @return array
* A render array.
public function report() {
return [
'#type' => 'markup',
'#markup' => $this->t('Implement method: report'),
];
}
* Placeholder controller for "variables".
* @param string $qaVariable
* The variable name.
public function view($qaVariable) {
$qaVariable
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function view(/** @scrutinizer ignore-unused */ $qaVariable) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
'#markup' => $this->t('Implement method: view'),
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.