Passed
Push — master ( 8b5ce5...b7fcc1 )
by Sebastian
12:08
created

Localization_Currency_CHF   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getStructuralTemplate() 0 3 1
A getISO() 0 3 1
A isSymbolOnFront() 0 3 1
A getSymbol() 0 3 1
A isNamePreferred() 0 3 1
A getPlural() 0 3 1
A getSingular() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AppLocalize;
6
7
use AppLocalize\Localization\Countries\CountryInterface;
8
use AppLocalize\Localization\Currencies\BaseCurrency;
9
10
class Localization_Currency_CHF extends BaseCurrency
11
{
12
    public const ISO_CODE = 'CHF';
13
14
    public function getISO() : string
15
    {
16
        return self::ISO_CODE;
17
    }
18
19
    public function getSingular() : string
20
    {
21
        return t('Swiss Franc');
22
    }
23
24
    public function isSymbolOnFront(): bool
25
    {
26
        return false;
27
    }
28
29
    public function isNamePreferred() : bool
30
    {
31
        return false;
32
    }
33
34
    public function getSymbol() : string
35
    {
36
        return 'F';
37
    }
38
39
    public function getPlural() : string
40
    {
41
        return t('Swiss Francs');
42
    }
43
44
    public function getStructuralTemplate(?CountryInterface $country=null): string
45
    {
46
        return '-{amount} {symbol}';
47
    }
48
}
49