| Total Complexity | 3 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Validate extends Exception |
||
| 6 | { |
||
| 7 | public $errors; |
||
| 8 | public $attribute = null; |
||
| 9 | 1 | public function getLogMessage() { |
|
| 10 | 1 | $errors = []; |
|
| 11 | 1 | foreach ($this->errors as $value) { |
|
| 12 | 1 | $errors[] = implode(', ', $value); |
|
| 13 | } |
||
| 14 | |||
| 15 | 1 | return \Yii::t('app', 'Column {column} attribute {attribute} validation errors: {errors}', [ |
|
| 16 | 1 | 'attribute' => $this->attribute, |
|
| 17 | 1 | 'column' => $this->columnNbr, |
|
| 18 | 1 | 'errors' => implode(', ', $errors), |
|
| 19 | ]); |
||
| 20 | } |
||
| 21 | 1 | public function getLogCategory() { |
|
| 23 | } |
||
| 24 | } |