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

PayButtonCommentsBootstrap   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 9
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 6 1
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