Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace RuleCom\Notifier; |
||
38 | private function getChannel($name, $notification) |
||
39 | { |
||
40 | $method = "to" . ucfirst($name); |
||
41 | |||
42 | if (! method_exists($notification, $method)) { |
||
43 | throw new BadMethodCallException("Method: {$method} does not exist"); |
||
44 | } |
||
45 | |||
46 | return $notification->{$method}(); |
||
47 | } |
||
48 | } |
||
49 |