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