Passed
Pull Request — master (#548)
by Sergei
03:01
created

DataSetWithPostValidationHook::getAttributeValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
cc 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\Support\Data;
6
7
use Yiisoft\Validator\DataSetInterface;
8
use Yiisoft\Validator\PostValidationHookInterface;
9
use Yiisoft\Validator\Result;
10
11
final class DataSetWithPostValidationHook implements DataSetInterface, PostValidationHookInterface
12
{
13
    public bool $hookCalled = false;
14
15
    public function getAttributeValue(string $attribute): mixed
16
    {
17
        return null;
18
    }
19
20
    public function getData(): ?array
21
    {
22
        return null;
23
    }
24
25
    public function hasAttribute(string $attribute): bool
26
    {
27
        return false;
28
    }
29
30
    public function processValidationResult(Result $result): void
31
    {
32
        $this->hookCalled = true;
33
    }
34
}
35