RewardManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusReferralsPlugin\Reward;
6
7
use Sylius\Component\Core\Model\OrderInterface;
8
9
final class RewardManager implements RewardManagerInterface
10
{
11
    public function __construct(
12
        private RewardHandlerInterface $rewardHandler,
13
    ) {
14
    }
15
16
    public function create(OrderInterface $order): void
17
    {
18
        $this->rewardHandler->apply($order);
19
    }
20
}
21