Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
29 | 6 | public function incrementBy(float $value, array $labels = []): static |
|
30 | { |
||
31 | 6 | if ($value < 0) { |
|
32 | 1 | throw new PrometheusException('Counters can only be incremented by non-negative amounts.'); |
|
33 | } |
||
34 | |||
35 | 5 | static::$storage->increment($this, $value, $labels); |
|
36 | |||
37 | 5 | return $this; |
|
38 | } |
||
40 |