Passed
Push — master ( 2d5d0a...7d78c5 )
by Adrien
02:23
created

CHFType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 10
ccs 2
cts 4
cp 0.5
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createMoney() 0 3 1
A getName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\DBAL\Types;
6
7
use Money\Money;
8
9
class CHFType extends AbstractMoneyType
10
{
11
    public function getName()
12
    {
13
        return 'CHF';
14
    }
15
16 2
    protected function createMoney(string $value): Money
17
    {
18 2
        return Money::CHF($value);
19
    }
20
}
21