| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 5 | public function __construct( |
|
| 28 | Channel $channel, |
||
| 29 | Chat $chat, |
||
| 30 | User $recipient, |
||
| 31 | string $text = null, |
||
| 32 | Template $template = null |
||
| 33 | ) { |
||
| 34 | 5 | if ($text === null && $template === null) { |
|
| 35 | 1 | throw new InvalidArgumentException('Either text or template should be set.'); |
|
| 36 | } |
||
| 37 | |||
| 38 | 4 | $this->channel = $channel; |
|
| 39 | 4 | $this->chat = $chat; |
|
| 40 | 4 | $this->recipient = $recipient; |
|
| 41 | 4 | $this->text = $text; |
|
| 42 | 4 | $this->template = $template; |
|
| 43 | 4 | } |
|
| 44 | |||
| 51 |