Passed
Push — main ( e0948b...5456f8 )
by Fractal
02:50
created

PrometheusOptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9
 *
10
 * Copyright (c) 2024 Mykhailo Shtanko [email protected]
11
 *
12
 * For the full copyright and license information, please view the LICENSE.MD
13
 * file that was distributed with this source code.
14
 */
15
16
namespace FRZB\Component\MetricsPower\Attribute;
17
18
#[\Attribute(\Attribute::TARGET_CLASS)]
19
final readonly class PrometheusOptions implements OptionsInterface
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 19 at column 6
Loading history...
20
{
21
    public string $counterName;
22
23
    public function __construct(
24
        public string $topic,
25
        public string $name,
26
        public string $help,
27
        public array $labels,
28
        public array $values,
29
        public bool $isSerializable = true,
30
    ) {}
31
32
    public function isSerializable(): bool
33
    {
34
        return $this->isSerializable;
35
    }
36
}
37