Sample   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 36
ccs 8
cts 8
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A labels() 0 3 1
A value() 0 3 1
A __construct() 0 2 1
A name() 0 3 1
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