AbstractOption::getAction()   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
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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