| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 57 | private function validateElement() |
||
| 58 | {
|
||
| 59 | if (mb_strlen($this->title) > 20) {
|
||
| 60 | throw new \InvalidArgumentException('The "title" field should not exceed 20 characters');
|
||
| 61 | } |
||
| 62 | |||
| 63 | if (!empty($this->payload) && mb_strlen($this->payload) > 1000) {
|
||
| 64 | throw new \InvalidArgumentException('The "payload" field should not exceed 1000 characters');
|
||
| 65 | } |
||
| 66 | } |
||
| 67 | } |