AddProductToComparerRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getProductId() 0 3 1
A getComparer() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Locastic\SyliusComparerPlugin\Request;
6
7
use Locastic\SyliusComparerPlugin\Entity\ComparerInterface;
8
9
final class AddProductToComparerRequest implements ComparerRequestInterface
10
{
11
    /** @var string */
12
    private $productId;
13
14
    /** @var ComparerInterface */
15
    private $comparer;
16
17
    public function __construct(string $productId, ComparerInterface $comparer)
18
    {
19
        $this->productId = $productId;
20
        $this->comparer = $comparer;
21
    }
22
23
    public function getComparer(): ComparerInterface
24
    {
25
        return $this->comparer;
26
    }
27
28
    public function getProductId(): string
29
    {
30
        return $this->productId;
31
    }
32
}
33