CoordinatesRuleSet   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRules() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\Support\Rule;
6
7
use Yiisoft\Validator\Rule\Composite;
8
use Yiisoft\Validator\Rule\Nested;
9
use Yiisoft\Validator\Rule\Number;
10
11
final class CoordinatesRuleSet extends Composite
12
{
13
    public function getRules(): array
14
    {
15
        return [
16
            new Nested([
17
                'latitude' => new Number(min: -90, max: 90),
18
                'longitude' => new Number(min: -180, max: 180),
19
            ]),
20
        ];
21
    }
22
}
23