AdditionCount::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
}