| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 21 | protected function validateAttribute($object, $attribute) |
||
| 22 | { |
||
| 23 | foreach ($this->filters as $filter) { |
||
| 24 | if (!is_callable($filter)) { |
||
| 25 | throw new \CException(\Yii::t('yii', 'The "filter" property must be specified with a valid callback.')); |
||
| 26 | } |
||
| 27 | |||
| 28 | $object->$attribute = call_user_func_array($filter, [$object->$attribute]); |
||
| 29 | } |
||
| 31 | } |