Completed
Push — develop ( 714528...0e9dd7 )
by Greg
04:25
created

PluralRuleUnknown   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A plurals() 0 4 1
A plural() 0 4 1
1
<?php namespace Fisharebest\Localization\PluralRule;
2
3
use DomainException;
4
5
/**
6
 * Class PluralRuleUnknown - used by languages for which the plural rules are not known.
7
 *
8
 * We cannot use this language for translation, but we can use its other attributes.
9
 *
10
 * @author    Greg Roach <[email protected]>
11
 * @copyright (c) 2018 Greg Roach
12
 * @license   GPLv3+
13
 */
14
class PluralRuleUnknown implements PluralRuleInterface
15
{
16
    public function plurals()
17
    {
18
        throw new DomainException('No plural rule defined for this language');
19
    }
20
21
    public function plural($number)
22
    {
23
        throw new DomainException('No plural rule defined for this language');
24
    }
25
}
26