| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | private function getSpecificConfiguration($type) { |
||
| 32 | $notifications = $this->getHost()->getCustomProperty('notifications'); |
||
| 33 | if($notifications) { |
||
| 34 | if(!isset($notifications['configuration'][$type])) { |
||
| 35 | return null; |
||
| 36 | } |
||
| 37 | if(count($notifications['configuration'][$type]) == 1) { |
||
| 38 | $configuration = config('server-monitor-plugin-notification-by-host.notifications.channels.'.$type); |
||
| 39 | return $notifications['configuration'][$type][array_keys($configuration)[0]]; |
||
| 40 | } |
||
| 41 | return $notifications['configuration'][$type]; |
||
| 42 | } |
||
| 43 | return null; |
||
| 44 | } |
||
| 46 |