Dollar   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getGender() 0 3 1
A getItems() 0 3 1
A getDerivative() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: rikosage
5
 * Date: 12/02/19
6
 * Time: 15:48
7
 */
8
9
namespace rikosage\NumberWordify\Unit\Currency;
10
11
use rikosage\NumberWordify\Base\Declinable;
12
use rikosage\NumberWordify\Unit\DerivativeInterface;
13
use rikosage\NumberWordify\Unit\UnitInterface;
14
15
/**
16
 * Единица измерения: доллар
17
 *
18
 * @package rikosage\NumberWordify\Unit\Currency
19
 */
20
class Dollar implements UnitInterface, DerivativeInterface
21
{
22
    /**
23
     * @inheritdoc
24
     */
25
    public function getGender()
26
    {
27
        return Declinable::TYPE_MASCULINE;
28
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public function getItems()
34
    {
35
        return ['доллар', 'доллара', 'долларов'];
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41
    public function getDerivative(): UnitInterface
42
    {
43
        return new Cent();
44
    }
45
}