Completed
Push — master ( 0b8c6e...20e866 )
by Dmitry
12:39
created

PayButtonCommentsBootstrap::bootstrap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace hipanel\modules\finance\bootstrap;
4
5
use hipanel\modules\finance\widgets\PayButtonComment;
6
use hiqdev\yii2\merchant\widgets\PayButton;
7
use Yii;
8
use yii\base\BootstrapInterface;
9
use yii\base\Event;
10
11
class PayButtonCommentsBootstrap implements BootstrapInterface
12
{
13
    public function bootstrap($app)
14
    {
15
        Event::on(PayButton::class, PayButton::EVENT_RENDER_COMMENT, function ($event) use ($app) {
16
            echo Yii::createObject(PayButtonComment::class, [$event])->run();
17
        });
18
    }
19
}
20