| Conditions | 2 |
| Paths | 2 |
| Total Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function setFrom(string $from = '') : SMSender\IMessage |
||
| 16 | { |
||
| 17 | 1 | if (!Strings::match($from, '~^[0-9a-zA-Z\. -]{1,14}$~')) |
|
| 18 | 1 | throw new InvalidArgumentException('Parameter "from" can contain only alphanumerical character, space, "-" and "." and must have from 1-14 characters.'); |
|
| 19 | 1 | return parent::setFrom($from); |
|
| 20 | } |
||
| 21 | |||
| 36 |