Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function createNotification($format, $alert, array $options = [], $tagsOrTagExpression = '', \DateTime $scheduleTime = null) |
||
21 | { |
||
22 | $class = __NAMESPACE__.'\\'.ucfirst($format).'Notification'; |
||
23 | |||
24 | if (!class_exists($class)) { |
||
25 | throw new \RuntimeException('Invalid format: '.$format); |
||
26 | } |
||
27 | |||
28 | return new $class($alert, $options, $tagsOrTagExpression, $scheduleTime); |
||
29 | } |
||
30 | } |
||
31 |