| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 2 | public function __construct($callbackUri, $senderAddress) |
|
| 27 | { |
||
| 28 | 2 | $this->enforceHttpSecureProtocol($callbackUri); |
|
| 29 | |||
| 30 | 1 | if (! $senderAddress) { |
|
| 31 | throw new Exception('Missing sender address'); |
||
| 32 | } |
||
| 33 | |||
| 34 | 1 | $this->senderAddress = 'tel:'.$this->normalizePhoneNumber($senderAddress); |
|
| 35 | |||
| 36 | 1 | $this->body = [ |
|
| 37 | "deliveryReceiptSubscription" => [ |
||
| 38 | "callbackReference" => [ |
||
| 39 | 1 | "notifyURL" => $callbackUri |
|
| 40 | ] |
||
| 90 |