Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 5 | public function __construct(Chat $chat, User $recipient, string $text = null, Template $template = null) |
|
25 | { |
||
26 | 5 | if ($text === null && $template === null) { |
|
27 | 1 | throw new InvalidArgumentException('Either text or template should be set.'); |
|
28 | } |
||
29 | |||
30 | 4 | $this->chat = $chat; |
|
31 | 4 | $this->recipient = $recipient; |
|
32 | 4 | $this->text = $text; |
|
33 | 4 | $this->template = $template; |
|
34 | 4 | } |
|
35 | |||
41 |