Passed
Push — master ( 989424...9f50f4 )
by Jonathan
29s
created

Rules   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 17
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSingularRuleset() 0 6 1
A getPluralRuleset() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Inflector\Rules\Spanish;
6
7
use Doctrine\Inflector\Rules\Patterns;
8
use Doctrine\Inflector\Rules\Ruleset;
9
use Doctrine\Inflector\Rules\Substitutions;
10
use Doctrine\Inflector\Rules\Transformations;
11
12
final class Rules
13
{
14 72
    public static function getSingularRuleset() : Ruleset
15
    {
16 72
        return new Ruleset(
17 72
            new Transformations(...Inflectible::getSingular()),
18 72
            new Patterns(...Uninflected::getSingular()),
19 72
            (new Substitutions(...Inflectible::getIrregular()))->getFlippedSubstitutions()
20
        );
21
    }
22
23 72
    public static function getPluralRuleset() : Ruleset
24
    {
25 72
        return new Ruleset(
26 72
            new Transformations(...Inflectible::getPlural()),
27 72
            new Patterns(...Uninflected::getPlural()),
28 72
            new Substitutions(...Inflectible::getIrregular())
29
        );
30
    }
31
}
32