ComparerProduct   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setComparer() 0 3 1
A getComparer() 0 3 1
A getProduct() 0 3 1
A getId() 0 3 1
A setProduct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Locastic\SyliusComparerPlugin\Entity;
6
7
use Sylius\Component\Core\Model\ProductInterface;
8
9
class ComparerProduct implements ComparerProductInterface
10
{
11
    /** @var int */
12
    private $id;
13
14
    /** @var ComparerInterface */
15
    private $comparer;
16
17
    /** @var ProductInterface */
18
    private $product;
19
20
    public function getId(): ?int
21
    {
22
        return $this->id;
23
    }
24
25
    public function setComparer(ComparerInterface $comparer): void
26
    {
27
        $this->comparer = $comparer;
28
    }
29
30
    public function getComparer(): ComparerInterface
31
    {
32
        return $this->comparer;
33
    }
34
35
    public function setProduct(ProductInterface $product): void
36
    {
37
        $this->product = $product;
38
    }
39
40
    public function getProduct(): ?ProductInterface
41
    {
42
        return $this->product;
43
    }
44
}
45