| Conditions | 5 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 5.3906 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | 5 | public function __construct($title, $payload) |
|
| 27 | { |
||
| 28 | 5 | if (empty($title) || mb_strlen($title) > 20) { |
|
| 29 | throw new \InvalidArgumentException('$title should not exceed 20 characters.'); |
||
| 30 | } |
||
| 31 | 5 | if (empty($payload) || mb_strlen($payload) > 1000) { |
|
| 32 | throw new \InvalidArgumentException('$payload should not exceed 1000 characters.'); |
||
| 33 | } |
||
| 34 | |||
| 35 | 5 | $this->title = $title; |
|
| 36 | 5 | $this->payload = $payload; |
|
| 37 | 5 | } |
|
| 38 | |||
| 75 |