| Conditions | 3 |
| Paths | 4 |
| Total Lines | 25 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function __construct(array $config) |
||
| 34 | { |
||
| 35 | $resolver = new OptionsResolver(); |
||
| 36 | $resolver->setRequired( |
||
| 37 | [ |
||
| 38 | 'username', |
||
| 39 | 'password', |
||
| 40 | 'base_uri', |
||
| 41 | 'default_resolved_incident_message', |
||
| 42 | 'default_failed_incident_message', |
||
| 43 | 'metric_update', |
||
| 44 | 'incident_update', |
||
| 45 | ] |
||
| 46 | ); |
||
| 47 | |||
| 48 | $options = $resolver->resolve($config['hogosha_portal']); |
||
| 49 | |||
| 50 | if ($options['metric_update']) { |
||
| 51 | $this->pushers['metric'] = new MetricPusher($options); |
||
| 52 | } |
||
| 53 | |||
| 54 | if ($options['incident_update']) { |
||
| 55 | $this->pushers['incident'] = new IncidentPusher($options); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 73 |