SimpleCommandHandlerImpl   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A discontinueProduct() 0 5 1
1
<?php declare(strict_types=1);
2
namespace Kepawni\Twilted\Basic\TestSample;
3
4
use Kepawni\Twilted\Basic\SimpleCommandHandler;
5
use Kepawni\Twilted\EntityIdentifier;
6
7
class SimpleCommandHandlerImpl extends SimpleCommandHandler
8
{
9
    public function discontinueProduct(EntityIdentifier $id)
10
    {
11
        $product = $this->loadFromRepository($id);
12
        // $product->discontinue();
13
        $this->saveToRepository($product);
14
    }
15
}
16