Passed
Pull Request — master (#275)
by Sergei
03:07
created

PureInputData::isValidated()   A

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
declare(strict_types=1);
4
5
namespace Yiisoft\Form\InputData\Pure;
6
7
use Yiisoft\Form\Field\Base\InputDataInterface;
8
9
final class PureInputData implements InputDataInterface
10
{
11 116
    public function __construct(
12
        private ?string $name = null,
13
        private mixed $value = null,
14
    ) {
15 116
    }
16
17
    public function getValidationRules(): array
18
    {
19
        return [];
20
    }
21
22 1
    public function getName(): ?string
23
    {
24 1
        return $this->name;
25
    }
26
27 1
    public function getValue(): mixed
28
    {
29 1
        return $this->value;
30
    }
31
32 107
    public function getLabel(): ?string
33
    {
34 107
        return null;
35
    }
36
37 107
    public function getHint(): ?string
38
    {
39 107
        return null;
40
    }
41
42 1
    public function getPlaceholder(): ?string
43
    {
44 1
        return null;
45
    }
46
47 7
    public function getId(): ?string
48
    {
49 7
        return null;
50
    }
51
52 1
    public function isValidated(): bool
53
    {
54 1
        return false;
55
    }
56
57 107
    public function getValidationErrors(): array
58
    {
59 107
        return [];
60
    }
61
}
62