1 | <?php |
||
26 | class Coupon implements EntityInterface |
||
27 | { |
||
28 | use Identifiable; |
||
29 | use Translatable; |
||
30 | use Timestampable; |
||
31 | use Blameable; |
||
32 | |||
33 | protected $code = ''; |
||
34 | protected $currency = ''; |
||
35 | protected $modifierType = '%'; |
||
36 | protected $modifierValue = 0.00; |
||
37 | protected $clientUsageLimit = 1; |
||
38 | protected $globalUsageLimit = 1; |
||
39 | protected $minimumOrderValue = 1; |
||
40 | protected $excludePromotions = true; |
||
41 | |||
42 | /** |
||
43 | * @var \DateTime|null |
||
44 | */ |
||
45 | protected $validFrom; |
||
46 | |||
47 | /** |
||
48 | * @var \DateTime|null |
||
49 | */ |
||
50 | protected $validTo; |
||
51 | |||
52 | public function __construct() |
||
56 | |||
57 | public function getCode(): string |
||
61 | |||
62 | public function setCode(string $code) |
||
66 | |||
67 | public function getCurrency(): string |
||
71 | |||
72 | public function setCurrency(string $currency) |
||
76 | |||
77 | public function getModifierType(): string |
||
81 | |||
82 | public function setModifierType(string $modifierType) |
||
86 | |||
87 | public function getModifierValue(): float |
||
91 | |||
92 | public function setModifierValue(float $modifierValue) |
||
96 | |||
97 | public function getValidFrom() |
||
101 | |||
102 | public function setValidFrom(\DateTime $validFrom = null) |
||
106 | |||
107 | public function getValidTo() |
||
111 | |||
112 | public function setValidTo(\DateTime $validTo = null) |
||
116 | |||
117 | public function getClientUsageLimit(): int |
||
121 | |||
122 | public function setClientUsageLimit(int $clientUsageLimit) |
||
126 | |||
127 | public function getGlobalUsageLimit(): int |
||
131 | |||
132 | public function setGlobalUsageLimit(int $globalUsageLimit) |
||
136 | |||
137 | public function getMinimumOrderValue(): float |
||
141 | |||
142 | public function setMinimumOrderValue(float $minimumOrderValue) |
||
146 | |||
147 | public function isExcludePromotions(): bool |
||
151 | |||
152 | public function setExcludePromotions(bool $excludePromotions) |
||
156 | |||
157 | public function translate($locale = null, $fallbackToDefault = true): CouponTranslation |
||
161 | } |
||
162 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.