| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | public function push($api_key, $subject, $content, $url) |
||
| 8 | { |
||
| 9 | $push = new \GJClasses\Push('pushbullet'); |
||
| 10 | $type = $push->getPushType($url); |
||
| 11 | |||
| 12 | if ($type == 'note') { |
||
| 13 | |||
| 14 | $message = $this->pushNote($api_key, $subject, $content); |
||
| 15 | |||
| 16 | } elseif ($type == 'url') { |
||
| 17 | |||
| 18 | $message = $this->pushUrl($api_key, $subject, $content, $url); |
||
| 19 | |||
| 20 | } else { |
||
| 21 | |||
| 22 | $message = 'Push type incorrect or not specified'; |
||
| 23 | |||
| 24 | } |
||
| 25 | |||
| 26 | return $message; |
||
| 27 | } |
||
| 43 |