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

Localization_Currency_USD::getExamples()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 23
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 2
eloc 16
c 1
b 1
f 0
nc 2
nop 1
dl 0
loc 23
rs 9.7333
1
<?php
2
3
namespace AppLocalize;
4
5
use AppLocalize\Localization\Countries\CountryInterface;
6
use AppLocalize\Localization\Currencies\BaseCurrency;
7
8
class Localization_Currency_USD extends BaseCurrency
9
{
10
    public const ISO_CODE = 'USD';
11
12
    public function getSingular() : string
13
    {
14
        return t('Dollar');
15
    }
16
17
    public function getSymbol() : string
18
    {
19
        return '$';
20
    }
21
22
    public function getPlural() : string
23
    {
24
        return t('Dollars');
25
    }
26
    
27
    public function getISO() : string
28
    {
29
        return self::ISO_CODE;
30
    }
31
32
    public function isNamePreferred() : bool
33
    {
34
        return false;
35
    }
36
37
    public function isSymbolOnFront() : bool
38
    {
39
        return true;
40
    }
41
42
    public function getStructuralTemplate(?CountryInterface $country=null) : string
43
    {
44
        return '-{symbol}{amount}';
45
    }
46
}