| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function create($type, $options = [], $contextualTags = []) |
||
| 22 | { |
||
| 23 | $collector = Factory::create($type, $options); |
||
| 24 | |||
| 25 | switch ($type) { |
||
| 26 | case 'dogstatsd': |
||
| 27 | /** @var DogStatsD $collector */ |
||
| 28 | return new DogStatsDMetricService($collector, $contextualTags); |
||
| 29 | case 'statsd': |
||
| 30 | /** @var StatsD $collector */ |
||
| 31 | return new StatsDMetricService($collector); |
||
| 32 | } |
||
| 33 | |||
| 34 | throw new \Exception(sprintf('MetricService for %s is not implemented', $type)); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |