AbstractOption   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 20
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAction() 0 3 1
1
<?php
2
3
namespace kalanis\Pohoda\Common\Attributes\Options;
4
5
use kalanis\Pohoda\Common\OptionsResolver\ActionsEnum;
6
7
/**
8
 * These children will set rules for normalization
9
 */
10
abstract class AbstractOption
11
{
12 167
    public function __construct(
13
        public readonly mixed $value = null,
14
        public readonly bool $isNullable = false,
15 167
    ) {}
16
17
    /**
18
     * @return class-string<object>
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<object> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<object>.
Loading history...
19
     */
20
    abstract public function getNormalizer(): string;
21
22
    /**
23
     * What kind of operation will be used
24
     *
25
     * @return ActionsEnum
26
     */
27 136
    public function getAction(): ActionsEnum
28
    {
29 136
        return ActionsEnum::NORMALIZER;
30
    }
31
}
32