Passed
Pull Request — master (#507)
by
unknown
03:48 queued 01:09
created

CoordinatesRuleSet   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRules() 0 5 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\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