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