Conditions | 5 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | public function attributes() |
||
23 | { |
||
24 | $attributes = \yii\base\Model::attributes(); |
||
25 | foreach (self::rules() as $rule) { |
||
26 | if (is_string(reset($rule))) { |
||
27 | continue; |
||
28 | } |
||
29 | foreach (reset($rule) as $attribute) { |
||
30 | if (substr_compare($attribute, '!', 0, 1) === 0) { |
||
31 | $attribute = mb_substr($attribute, 1); |
||
32 | } |
||
33 | $attributes[$attribute] = $attribute; |
||
34 | } |
||
35 | } |
||
36 | return array_values($attributes); |
||
37 | } |
||
38 | } |
||
39 |