| Conditions | 4 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 17 | public function __construct() |
|
| 33 | { |
||
| 34 | 17 | parent::__construct(); |
|
| 35 | |||
| 36 | 17 | foreach ($this->labels as $label) { |
|
| 37 | 15 | if (preg_match('/^le$/', $label)) { |
|
| 38 | 1 | throw new LabelException('The label `le` is used internally to designate buckets.'); |
|
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | 16 | if (count($this->buckets) < 1) { |
|
| 43 | 1 | throw new PrometheusException('Histograms must contain at least one bucket.'); |
|
| 44 | } |
||
| 45 | |||
| 46 | 15 | sort($this->buckets); |
|
| 47 | 15 | } |
|
| 85 |