for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace modules\users;
use Yii;
/**
* Class Bootstrap
* @package modules\users
*/
class Bootstrap
{
* @param array $config
public function __construct($config = [])
$config
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function __construct(/** @scrutinizer ignore-unused */ $config = [])
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
Yii::$app->i18n->translations['modules/users/*'] = [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@modules/users/messages',
'fileMap' => [
'modules/users/module' => 'module.php',
'modules/users/mail' => 'mail.php',
],
];
Yii::$app->getUrlManager()->addRules(
[
// Rules
'<_a:(login|logout|signup|email-confirm|request-password-reset|reset-password)>' => 'users/default/<_a>',
'class' => 'yii\web\GroupUrlRule',
'routePrefix' => 'users/default',
'prefix' => 'user',
'rules' => [
'<_a:(create)>' => '<_a>',
'<id:\d+>/<_a:[\w\-]+>' => '<_a>',
'prefix' => 'users',
'' => 'index',
'<_a:[\w\-]+>' => '<_a>',
'routePrefix' => 'users/profile',
'prefix' => 'profile',
]
);
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.