| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function SendNotification(SendNotificationResponseType $message) |
||
| 23 | { |
||
| 24 | $message = ExchangeWebServices::drillDownResponseLevels($message); |
||
| 25 | |||
| 26 | $handler = $this->handler; |
||
| 27 | $response = $handler($message); |
||
| 28 | |||
| 29 | if ($response !== SubscriptionStatusType::OK && $response !== SubscriptionStatusType::UNSUBSCRIBE) { |
||
| 30 | throw new Exception('Unexpected Subscription Status Response'); |
||
| 31 | } |
||
| 32 | |||
| 33 | $result = new SendNotificationResultType(); |
||
| 34 | $result->setSubscriptionStatus($response); |
||
| 35 | |||
| 36 | return $result->toXmlObject(); |
||
| 37 | } |
||
| 39 |