MetricFamilySamples::metric()   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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Krenor\Prometheus;
4
5
use Krenor\Prometheus\Contracts\Metric;
6
use Tightenco\Collect\Support\Collection;
7
8
class MetricFamilySamples
9
{
10
    /**
11
     * MetricFamilySamples constructor.
12
     *
13
     * @param Metric $metric
14
     * @param Collection|Sample[] $samples
15
     */
16 70
    public function __construct(protected Metric $metric, protected Collection $samples)
17
    {
18
        //
19 70
    }
20
21
    /**
22
     * @return Metric
23
     */
24 70
    public function metric(): Metric
25
    {
26 70
        return $this->metric;
27
    }
28
29
    /**
30
     * @return Collection|Sample[]
31
     */
32 70
    public function samples(): Collection
33
    {
34 70
        return $this->samples;
35
    }
36
}
37