Test Failed
Pull Request — master (#805)
by Maxim
06:32
created

ValidationConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefaultValidator() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Validation\Config;
6
7
use Spiral\Core\InjectableConfig;
8
9
final class ValidationConfig extends InjectableConfig
10
{
11
    public const CONFIG = 'validation';
12
13
    protected array $config = [
14
        'defaultValidator' => null,
15
    ];
16
17
    public function getDefaultValidator(): ?string
18
    {
19
        return $this->config['defaultValidator'] ?? null;
20
    }
21
}
22