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