| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 3 | public function __construct( |
|
| 31 | string $message, |
||
| 32 | array $recipients, |
||
| 33 | ?RequestType $requestTypeHigh = null, |
||
| 34 | ?string $sender = null, |
||
| 35 | ?int $customId = null |
||
| 36 | ) { |
||
| 37 | 3 | if (count($recipients) === 0) { |
|
| 38 | 1 | throw new NoRecipientsProvided(); |
|
| 39 | } |
||
| 40 | |||
| 41 | 2 | $this->message = $message; |
|
| 42 | |||
| 43 | 2 | if ($requestTypeHigh === null) { |
|
| 44 | 1 | $requestTypeHigh = RequestType::getRequestTypeHigh(); |
|
| 45 | } |
||
| 46 | 2 | $this->requestType = $requestTypeHigh; |
|
| 47 | 2 | $this->sender = $sender; |
|
| 48 | 2 | $this->customId = $customId; |
|
| 49 | 2 | $this->recipients = $recipients; |
|
| 50 | 2 | } |
|
| 80 |