ProductVariantTrait::setCostPrice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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