Completed
Push — master ( b535da...62dc0f )
by Andrii
16:29
created

AvailableMerchants::defaultOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hipanel\modules\finance\widgets;
4
5
use yii\base\Widget;
6
use yii\helpers\Html;
7
8
class AvailableMerchants extends Widget
9
{
10
    public $merchants = [];
11
12
    public function run()
13
    {
14
        $list = array_map(function ($merchant) { return Html::tag('b', $merchant->label); }, $this->merchants);
15
16
        return implode(',&nbsp; ', array_unique($list));
17
    }
18
}
19