Completed
Push — master ( ff4ea2...6a4b58 )
by
unknown
02:23
created

Product   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 18
lcom 0
cbo 1
dl 0
loc 117
rs 10
c 0
b 0
f 0

18 Methods

Rating   Name   Duplication   Size   Complexity  
A setSiteId() 0 4 1
A getType() 0 4 1
A setType() 0 4 1
A getPrice() 0 4 1
A setPrice() 0 4 1
A getDescription() 0 4 1
A setDescription() 0 4 1
A getAllowRandomPrice() 0 4 1
A setAllowRandomPrice() 0 4 1
A getFields() 0 4 1
A setFields() 0 4 1
A getCurrencyId() 0 4 1
A setCurrencyId() 0 4 1
A getSiteId() 0 4 1
A getSite() 0 4 1
A setSite() 0 4 1
A getPayments() 0 4 1
A setPayments() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AcquiroPay\Models\Entities;
6
7
class Product extends Entity
8
{
9
    const TYPE_FREE_PRICE = 'FREE_PRICE';
10
    const TYPE_FIXED_PRICE = 'FIXED_PRICE';
11
    const TYPE_SUBSCRIBE = 'SUBSCRIBE';
12
13
    private $type;
14
    private $price;
15
    private $description;
16
    private $allowRandomPrice;
17
    private $fields;
18
    private $currencyId;
19
    private $siteId;
20
    private $site;
21
22
    /**
23
     * @var Payment[]
24
     */
25
    private $payments;
26
27
28
    public function getType(): ?string
29
    {
30
        return $this->type;
31
    }
32
33
    public function setType(?string $type): void
34
    {
35
        $this->type = $type;
36
    }
37
38
    public function getPrice(): ?float
39
    {
40
        return $this->price;
41
    }
42
43
    public function setPrice(?float $price): void
44
    {
45
        $this->price = $price;
46
    }
47
48
    public function getDescription(): ?string
49
    {
50
        return $this->description;
51
    }
52
53
    public function setDescription(?string $description): void
54
    {
55
        $this->description = $description;
56
    }
57
58
    public function getAllowRandomPrice(): bool
59
    {
60
        return $this->allowRandomPrice;
61
    }
62
63
    public function setAllowRandomPrice(bool $allowRandomPrice): void
64
    {
65
        $this->allowRandomPrice = $allowRandomPrice;
66
    }
67
68
    public function getFields(): ?string
69
    {
70
        return $this->fields;
71
    }
72
73
    public function setFields(?string $fields): void
74
    {
75
        $this->fields = $fields;
76
    }
77
78
    public function getCurrencyId(): ?int
79
    {
80
        return $this->currencyId;
81
    }
82
83
    public function setCurrencyId(?int $currencyId): void
84
    {
85
        $this->currencyId = $currencyId;
86
    }
87
88
    public function getSiteId(): ?int
89
    {
90
        return $this->siteId;
91
    }
92
93
    public function setSiteId(?int $siteId): void
94
    {
95
        $this->siteId = $siteId;
96
    }
97
98
    public function getSite(): ?Site
99
    {
100
        return $this->site;
101
    }
102
103
    public function setSite(?Site $site): void
104
    {
105
        $this->site = $site;
106
    }
107
108
    /**
109
     * @return Payment[]
110
     */
111
    public function getPayments(): array
112
    {
113
        return $this->payments;
114
    }
115
116
    /**
117
     * @param Payment[] $payments
118
     */
119
    public function setPayments(array $payments)
120
    {
121
        $this->payments = $payments;
122
    }
123
}
124