@@ -18,7 +18,13 @@ |
||
| 18 | 18 | |
| 19 | 19 | interface PromotionApplicatorInterface |
| 20 | 20 | { |
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 21 | 24 | public function apply(PromotionSubjectInterface $subject, PromotionInterface $promotion): void; |
| 22 | 25 | |
| 26 | + /** |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 23 | 29 | public function revert(PromotionSubjectInterface $subject, PromotionInterface $promotion): void; |
| 24 | 30 | } |
@@ -15,22 +15,44 @@ |
||
| 15 | 15 | |
| 16 | 16 | interface PromotionCouponGeneratorInstructionInterface |
| 17 | 17 | { |
| 18 | + /** |
|
| 19 | + * @return integer |
|
| 20 | + */ |
|
| 18 | 21 | public function getAmount(): ?int; |
| 19 | 22 | |
| 23 | + /** |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 20 | 26 | public function setAmount(?int $amount): void; |
| 21 | 27 | |
| 28 | + /** |
|
| 29 | + * @return integer |
|
| 30 | + */ |
|
| 22 | 31 | public function getCodeLength(): ?int; |
| 23 | 32 | |
| 33 | + /** |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 24 | 36 | public function setCodeLength(?int $codeLength): void; |
| 25 | 37 | |
| 38 | + /** |
|
| 39 | + * @return \DateTimeInterface |
|
| 40 | + */ |
|
| 26 | 41 | public function getExpiresAt(): ?\DateTimeInterface; |
| 27 | 42 | |
| 28 | 43 | /** |
| 29 | 44 | * @param \DateTimeInterface $expiresAt |
| 45 | + * @return void |
|
| 30 | 46 | */ |
| 31 | 47 | public function setExpiresAt(?\DateTimeInterface $expiresAt): void; |
| 32 | 48 | |
| 49 | + /** |
|
| 50 | + * @return integer |
|
| 51 | + */ |
|
| 33 | 52 | public function getUsageLimit(): ?int; |
| 34 | 53 | |
| 54 | + /** |
|
| 55 | + * @return void |
|
| 56 | + */ |
|
| 35 | 57 | public function setUsageLimit(int $usageLimit): void; |
| 36 | 58 | } |
@@ -17,9 +17,15 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface ConfigurablePromotionElementInterface extends ResourceInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return string |
|
| 22 | + */ |
|
| 20 | 23 | public function getType(): ?string; |
| 21 | 24 | |
| 22 | 25 | public function getConfiguration(): array; |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return PromotionInterface |
|
| 29 | + */ |
|
| 24 | 30 | public function getPromotion(): ?PromotionInterface; |
| 25 | 31 | } |
@@ -17,9 +17,18 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface PromotionActionInterface extends ResourceInterface, ConfigurablePromotionElementInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 20 | 23 | public function setType(?string $type): void; |
| 21 | 24 | |
| 25 | + /** |
|
| 26 | + * @return void |
|
| 27 | + */ |
|
| 22 | 28 | public function setConfiguration(array $configuration): void; |
| 23 | 29 | |
| 30 | + /** |
|
| 31 | + * @return void |
|
| 32 | + */ |
|
| 24 | 33 | public function setPromotion(?PromotionInterface $promotion): void; |
| 25 | 34 | } |
@@ -19,16 +19,31 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | interface PromotionCouponInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface |
| 21 | 21 | { |
| 22 | + /** |
|
| 23 | + * @return integer|null |
|
| 24 | + */ |
|
| 22 | 25 | public function getUsageLimit(): ?int; |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 24 | 30 | public function setUsageLimit(?int $usageLimit): void; |
| 25 | 31 | |
| 26 | 32 | public function getUsed(): int; |
| 27 | 33 | |
| 34 | + /** |
|
| 35 | + * @return void |
|
| 36 | + */ |
|
| 28 | 37 | public function setUsed(int $used): void; |
| 29 | 38 | |
| 39 | + /** |
|
| 40 | + * @return void |
|
| 41 | + */ |
|
| 30 | 42 | public function incrementUsed(): void; |
| 31 | 43 | |
| 44 | + /** |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 32 | 47 | public function decrementUsed(): void; |
| 33 | 48 | |
| 34 | 49 | /** |
@@ -36,12 +51,19 @@ discard block |
||
| 36 | 51 | */ |
| 37 | 52 | public function getPromotion(): ?PromotionInterface; |
| 38 | 53 | |
| 54 | + /** |
|
| 55 | + * @return void |
|
| 56 | + */ |
|
| 39 | 57 | public function setPromotion(?PromotionInterface $promotion): void; |
| 40 | 58 | |
| 59 | + /** |
|
| 60 | + * @return \DateTimeInterface |
|
| 61 | + */ |
|
| 41 | 62 | public function getExpiresAt(): ?\DateTimeInterface; |
| 42 | 63 | |
| 43 | 64 | /** |
| 44 | 65 | * @param \DateTimeInterface $expiresAt |
| 66 | + * @return void |
|
| 45 | 67 | */ |
| 46 | 68 | public function setExpiresAt(?\DateTimeInterface $expiresAt): void; |
| 47 | 69 | |
@@ -20,44 +20,92 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | interface PromotionInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface |
| 22 | 22 | { |
| 23 | + /** |
|
| 24 | + * @return string |
|
| 25 | + */ |
|
| 23 | 26 | public function getName(): ?string; |
| 24 | 27 | |
| 28 | + /** |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 25 | 31 | public function setName(?string $name): void; |
| 26 | 32 | |
| 33 | + /** |
|
| 34 | + * @return string |
|
| 35 | + */ |
|
| 27 | 36 | public function getDescription(): ?string; |
| 28 | 37 | |
| 38 | + /** |
|
| 39 | + * @return void |
|
| 40 | + */ |
|
| 29 | 41 | public function setDescription(?string $description): void; |
| 30 | 42 | |
| 31 | 43 | public function getPriority(): int; |
| 32 | 44 | |
| 45 | + /** |
|
| 46 | + * @return void |
|
| 47 | + */ |
|
| 33 | 48 | public function setPriority(?int $priority): void; |
| 34 | 49 | |
| 35 | 50 | public function isExclusive(): bool; |
| 36 | 51 | |
| 52 | + /** |
|
| 53 | + * @return void |
|
| 54 | + */ |
|
| 37 | 55 | public function setExclusive(?bool $exclusive): void; |
| 38 | 56 | |
| 57 | + /** |
|
| 58 | + * @return integer |
|
| 59 | + */ |
|
| 39 | 60 | public function getUsageLimit(): ?int; |
| 40 | 61 | |
| 62 | + /** |
|
| 63 | + * @return void |
|
| 64 | + */ |
|
| 41 | 65 | public function setUsageLimit(?int $usageLimit): void; |
| 42 | 66 | |
| 43 | 67 | public function getUsed(): int; |
| 44 | 68 | |
| 69 | + /** |
|
| 70 | + * @return void |
|
| 71 | + */ |
|
| 45 | 72 | public function setUsed(int $used): void; |
| 46 | 73 | |
| 74 | + /** |
|
| 75 | + * @return void |
|
| 76 | + */ |
|
| 47 | 77 | public function incrementUsed(): void; |
| 48 | 78 | |
| 79 | + /** |
|
| 80 | + * @return void |
|
| 81 | + */ |
|
| 49 | 82 | public function decrementUsed(): void; |
| 50 | 83 | |
| 84 | + /** |
|
| 85 | + * @return \DateTimeInterface |
|
| 86 | + */ |
|
| 51 | 87 | public function getStartsAt(): ?\DateTimeInterface; |
| 52 | 88 | |
| 89 | + /** |
|
| 90 | + * @return void |
|
| 91 | + */ |
|
| 53 | 92 | public function setStartsAt(?\DateTimeInterface $startsAt): void; |
| 54 | 93 | |
| 94 | + /** |
|
| 95 | + * @return \DateTimeInterface |
|
| 96 | + */ |
|
| 55 | 97 | public function getEndsAt(): ?\DateTimeInterface; |
| 56 | 98 | |
| 99 | + /** |
|
| 100 | + * @return void |
|
| 101 | + */ |
|
| 57 | 102 | public function setEndsAt(?\DateTimeInterface $endsAt): void; |
| 58 | 103 | |
| 59 | 104 | public function isCouponBased(): bool; |
| 60 | 105 | |
| 106 | + /** |
|
| 107 | + * @return void |
|
| 108 | + */ |
|
| 61 | 109 | public function setCouponBased(?bool $couponBased): void; |
| 62 | 110 | |
| 63 | 111 | /** |
@@ -69,8 +117,14 @@ discard block |
||
| 69 | 117 | |
| 70 | 118 | public function hasCoupons(): bool; |
| 71 | 119 | |
| 120 | + /** |
|
| 121 | + * @return void |
|
| 122 | + */ |
|
| 72 | 123 | public function addCoupon(PromotionCouponInterface $coupon): void; |
| 73 | 124 | |
| 125 | + /** |
|
| 126 | + * @return void |
|
| 127 | + */ |
|
| 74 | 128 | public function removeCoupon(PromotionCouponInterface $coupon): void; |
| 75 | 129 | |
| 76 | 130 | /** |
@@ -82,8 +136,14 @@ discard block |
||
| 82 | 136 | |
| 83 | 137 | public function hasRule(PromotionRuleInterface $rule): bool; |
| 84 | 138 | |
| 139 | + /** |
|
| 140 | + * @return void |
|
| 141 | + */ |
|
| 85 | 142 | public function addRule(PromotionRuleInterface $rule): void; |
| 86 | 143 | |
| 144 | + /** |
|
| 145 | + * @return void |
|
| 146 | + */ |
|
| 87 | 147 | public function removeRule(PromotionRuleInterface $rule): void; |
| 88 | 148 | |
| 89 | 149 | /** |
@@ -95,7 +155,13 @@ discard block |
||
| 95 | 155 | |
| 96 | 156 | public function hasAction(PromotionActionInterface $action): bool; |
| 97 | 157 | |
| 158 | + /** |
|
| 159 | + * @return void |
|
| 160 | + */ |
|
| 98 | 161 | public function addAction(PromotionActionInterface $action): void; |
| 99 | 162 | |
| 163 | + /** |
|
| 164 | + * @return void |
|
| 165 | + */ |
|
| 100 | 166 | public function removeAction(PromotionActionInterface $action): void; |
| 101 | 167 | } |
@@ -17,9 +17,18 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface PromotionRuleInterface extends ResourceInterface, ConfigurablePromotionElementInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 20 | 23 | public function setType(?string $type): void; |
| 21 | 24 | |
| 25 | + /** |
|
| 26 | + * @return void |
|
| 27 | + */ |
|
| 22 | 28 | public function setConfiguration(array $configuration): void; |
| 23 | 29 | |
| 30 | + /** |
|
| 31 | + * @return void |
|
| 32 | + */ |
|
| 24 | 33 | public function setPromotion(?PromotionInterface $promotion): void; |
| 25 | 34 | } |
@@ -17,5 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface PromotionProcessorInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 20 | 23 | public function process(PromotionSubjectInterface $subject): void; |
| 21 | 24 | } |