Sample::name()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Krenor\Prometheus;
4
5
use Tightenco\Collect\Support\Collection;
6
7
class Sample
8
{
9
    /**
10
     * Sample constructor.
11
     *
12
     * @param string $name
13
     * @param float $value
14
     * @param Collection $labels
15
     */
16 85
    public function __construct(protected string $name, protected float $value, protected Collection $labels)
17
    {
18
        //
19 85
    }
20
21
    /**
22
     * @return string
23
     */
24 71
    public function name(): string
25
    {
26 71
        return $this->name;
27
    }
28
29
    /**
30
     * @return float
31
     */
32 77
    public function value(): float
33
    {
34 77
        return $this->value;
35
    }
36
37
    /**
38
     * @return Collection
39
     */
40 80
    public function labels(): Collection
41
    {
42 80
        return $this->labels;
43
    }
44
}
45