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