| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.686 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 39 | 107 | private function check($model, $value) |
|
| 40 | { |
||
| 41 | 107 | if (is_array($value)) |
|
| 42 | 107 | { |
|
| 43 | $params = [ |
||
| 44 | get_class($model), |
||
| 45 | var_export($value, true) |
||
| 46 | ]; |
||
| 47 | $msg = vsprintf('Got array (expected string) on model `%s`: %s', $params); |
||
| 48 | throw new UnexpectedValueException($msg); |
||
| 49 | } |
||
| 50 | 107 | } |
|
| 51 | |||
| 53 |