Passed
Pull Request — master (#507)
by
unknown
02:31
created

CoordinatesRuleSet::getRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
eloc 3
nc 1
nop 0
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\Number;
9
10
final class CoordinatesRuleSet extends Composite
11
{
12
    public function getRules(): iterable
13
    {
14
        return [
15
            'latitude' => new Number(min: -90, max: 90),
16
            'longitude' => new Number(min: -180, max: 180),
17
        ];
18
    }
19
}
20