ChannelDeposit   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 55
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setProductVariant() 0 3 1
A getChannelCode() 0 3 1
A __toString() 0 3 1
A getProductVariant() 0 3 1
A getId() 0 3 1
A getPrice() 0 3 1
A setPrice() 0 3 1
A setChannelCode() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gewebe\SyliusProductDepositPlugin\Entity;
6
7
/**
8
 * Entity that stores deposit for product variants
9
 */
10
class ChannelDeposit implements ChannelDepositInterface
11
{
12
    /** @var mixed */
13
    private $id;
14
15
    /** @var int|null */
16
    private $price;
17
18
    /** @var string|null */
19
    private $channelCode;
20
21
    /** @var ProductVariantInterface|null */
22
    private $productVariant;
23
24
    public function __toString(): string
25
    {
26
        return (string) $this->getPrice();
27
    }
28
29
    /**
30
     * @return mixed
31
     */
32
    public function getId()
33
    {
34
        return $this->id;
35
    }
36
37
    public function getPrice(): ?int
38
    {
39
        return $this->price;
40
    }
41
42
    public function setPrice(?int $price): void
43
    {
44
        $this->price = $price;
45
    }
46
47
    public function getProductVariant(): ?ProductVariantInterface
48
    {
49
        return $this->productVariant;
50
    }
51
52
    public function setProductVariant(?ProductVariantInterface $productVariants): void
53
    {
54
        $this->productVariant = $productVariants;
55
    }
56
57
    public function getChannelCode(): ?string
58
    {
59
        return $this->channelCode;
60
    }
61
62
    public function setChannelCode(?string $channelCode): void
63
    {
64
        $this->channelCode = $channelCode;
65
    }
66
}
67