cashwarden /
api
| 1 | <?php |
||
| 2 | |||
| 3 | namespace app\core; |
||
| 4 | |||
| 5 | use app\core\behaviors\LoggerBehavior; |
||
| 6 | use yii\base\BootstrapInterface; |
||
| 7 | use yii\base\Controller; |
||
| 8 | use yii\base\Event; |
||
| 9 | use yii\web\Response; |
||
| 10 | |||
| 11 | class EventBootstrap implements BootstrapInterface |
||
| 12 | { |
||
| 13 | public function bootstrap($app) |
||
| 14 | { |
||
| 15 | Event::on(Response::class, Response::EVENT_BEFORE_SEND, function ($event) { |
||
| 16 | \Yii::createObject(LoggerBehavior::class)->beforeSend($event); |
||
| 17 | }); |
||
| 18 | |||
| 19 | Event::on(Controller::class, Controller::EVENT_BEFORE_ACTION, function ($event) { |
||
|
0 ignored issues
–
show
|
|||
| 20 | \Yii::createObject(LoggerBehavior::class)->beforeAction(); |
||
| 21 | }); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.