Passed
Branch main (274970)
by Antonio Oertel
03:05
created

TemporaryCalculator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A calculateDigit() 0 8 1
1
<?php
2
3
namespace Brazanation\Documents\Cns;
4
5
use Brazanation\Documents\DigitCalculable;
6
use Brazanation\Documents\DigitCalculator;
7
8
class TemporaryCalculator implements DigitCalculable
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 2
    public function calculateDigit(string $baseNumber) : string
14
    {
15 2
        $calculator = new DigitCalculator($baseNumber);
16 2
        $calculator->withMultipliersInterval(1, 15);
17
18 2
        $digit = $calculator->calculate();
19
20 2
        return "{$digit}";
21
    }
22
}
23