Completed
Push — master ( 05530a...d6dd8b )
by Dmitry
13:00
created

BillType::titlelize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace hipanel\modules\finance\widgets;
4
5
use hipanel\widgets\Type;
6
7
class BillType extends Type
8
{
9
    public $defaultValues = [
10
        'success' => [
11
            'deposit,*',
12
            'monthly,*',
13
        ],
14
        'info' => [
15
            'overuse,*',
16
        ],
17
        'warning' => [
18
            'monthly,monthly',
19
            'exchange,*'
20
        ],
21
        'primary' => [
22
            'monthly,leasing',
23
        ],
24
        'default' => [
25
            'monthly,hardware',
26
            'correction,*',
27
        ],
28
    ];
29
    public $field = 'type';
30
    public $i18nDictionary = 'hipanel:finance';
31
32
    /** {@inheritdoc} */
33
    protected function titlelize($label): string
34
    {
35
        return parent::titlelize(substr($label, strpos($label, ',')+1));
36
    }
37
}
38
39
40