Passed
Push — master ( 913c0a...fd8403 )
by Ondřej
05:45
created

IntegerStepper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A step() 0 8 2
1
<?php
2
declare(strict_types=1);
3
namespace Ivory\Value\Alg;
4
5
class IntegerStepper implements IDiscreteStepper
6
{
7
    public function step(int $delta, $value)
8
    {
9
        if ($value === null) {
10
            throw new \InvalidArgumentException();
11
        }
12
13
        return $value + $delta;
14
    }
15
}
16