for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace app\core;
use app\core\behaviors\LoggerBehavior;
use yii\base\BootstrapInterface;
use yii\base\Controller;
use yii\base\Event;
use yii\web\Response;
class EventBootstrap implements BootstrapInterface
{
public function bootstrap($app)
Event::on(Response::class, Response::EVENT_BEFORE_SEND, function ($event) {
\Yii::createObject(LoggerBehavior::class)->beforeSend($event);
});
Event::on(Controller::class, Controller::EVENT_BEFORE_ACTION, function ($event) {
$event
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
Event::on(Controller::class, Controller::EVENT_BEFORE_ACTION, function (/** @scrutinizer ignore-unused */ $event) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
\Yii::createObject(LoggerBehavior::class)->beforeAction();
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.