AdditionCount   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cart\CountOperation;
5
6
use Cart\Contracts\CounterItemContract;
7
8
/**
9
 * Class AdditionCount
10
 *
11
 * @package CountOperation
12
 */
13
class AdditionCount implements CounterItemContract
14
{
15
    /**
16
     * Operation
17
     * @param int $before
18
     * @param int $howMuch
19
     * @return int
20
     */
21 3
    public function execute(int $before, int $howMuch) : int
22
    {
23 3
        return $before + $howMuch;
24
    }
25
}