Passed
Pull Request — master (#97)
by Jonathan
09:17
created

Rules::getPluralRuleset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Inflector\Rules\Turkish;
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 18
    public static function getSingularRuleset() : Ruleset
15
    {
16 18
        return new Ruleset(
17 18
            new Transformations(...Inflectible::getSingular()),
18 18
            new Patterns(...Uninflected::getSingular()),
19 18
            (new Substitutions(...Inflectible::getIrregular()))->getFlippedSubstitutions()
20
        );
21
    }
22
23 18
    public static function getPluralRuleset() : Ruleset
24
    {
25 18
        return new Ruleset(
26 18
            new Transformations(...Inflectible::getPlural()),
27 18
            new Patterns(...Uninflected::getPlural()),
28 18
            new Substitutions(...Inflectible::getIrregular())
29
        );
30
    }
31
}
32