ProductVariantTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 46
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCostPriceCurrency() 0 3 1
A setCostPriceCurrency() 0 3 1
A setCostPrice() 0 3 1
A getCostPrice() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Setono\SyliusCostPricePlugin\Model;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
trait ProductVariantTrait
10
{
11
    /**
12
     * @ORM\Column(type="string", nullable=true)
13
     *
14
     * @var string|null
15
     */
16
    protected $costPriceCurrency;
17
18
    /**
19
     * @ORM\Column(type="integer", nullable=true)
20
     *
21
     * @var int|null
22
     */
23
    protected $costPrice;
24
25
    /**
26
     * @return string|null
27
     */
28
    public function getCostPriceCurrency(): ?string
29
    {
30
        return $this->costPriceCurrency;
31
    }
32
33
    /**
34
     * @param string|null $costPriceCurrency
35
     */
36
    public function setCostPriceCurrency(?string $costPriceCurrency): void
37
    {
38
        $this->costPriceCurrency = $costPriceCurrency;
39
    }
40
41
    /**
42
     * @return int|null
43
     */
44
    public function getCostPrice(): ?int
45
    {
46
        return $this->costPrice;
47
    }
48
49
    /**
50
     * @param int|null $costPrice
51
     */
52
    public function setCostPrice(?int $costPrice): void
53
    {
54
        $this->costPrice = $costPrice;
55
    }
56
}
57