Icelandic::decide()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 3
nc 4
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Polyglot\Pluralization\Rules;
6
7
/**
8
 * @package Polyglot/Pluralization/Rules
9
 * @author  Mihai MATEI <[email protected]>
10
 */
11
class Icelandic implements RuleInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16
    public function decide(int $n): int
17
    {
18
        return ($n % 10 !== 1 || $n % 100 === 11) ? 1 : 0;
19
    }
20
}