@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | /** |
| 185 | 185 | * Get subscription type. |
| 186 | 186 | * |
| 187 | - * @return int |
|
| 187 | + * @return string |
|
| 188 | 188 | */ |
| 189 | 189 | public function getType() |
| 190 | 190 | { |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * |
| 197 | 197 | * @param int $type |
| 198 | 198 | * |
| 199 | - * @return int |
|
| 199 | + * @return Subscription |
|
| 200 | 200 | */ |
| 201 | 201 | public function setType($type) |
| 202 | 202 | { |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | /** |
| 209 | 209 | * Get subscription price. |
| 210 | 210 | * |
| 211 | - * @return decimal |
|
| 211 | + * @return integer |
|
| 212 | 212 | */ |
| 213 | 213 | public function getPrice() |
| 214 | 214 | { |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | * |
| 245 | 245 | * @param string $currency |
| 246 | 246 | * |
| 247 | - * @return string |
|
| 247 | + * @return Subscription |
|
| 248 | 248 | */ |
| 249 | 249 | public function setCurrency($currency) |
| 250 | 250 | { |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | * |
| 293 | 293 | * @param bool $is_active |
| 294 | 294 | * |
| 295 | - * @return bool |
|
| 295 | + * @return Subscription |
|
| 296 | 296 | */ |
| 297 | 297 | public function setIsActive($is_active) |
| 298 | 298 | { |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | /** |
| 305 | 305 | * Get subscription create date. |
| 306 | 306 | * |
| 307 | - * @return datetime |
|
| 307 | + * @return string |
|
| 308 | 308 | */ |
| 309 | 309 | public function getCreatedAt() |
| 310 | 310 | { |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | /** |
| 315 | 315 | * Set subscription create date. |
| 316 | 316 | * |
| 317 | - * @param datetime $created_at |
|
| 317 | + * @param \DateTime $created_at |
|
| 318 | 318 | * |
| 319 | 319 | * @return datetime |
| 320 | 320 | */ |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | * |
| 341 | 341 | * @param bool $is_default |
| 342 | 342 | * |
| 343 | - * @return bool |
|
| 343 | + * @return Subscription |
|
| 344 | 344 | */ |
| 345 | 345 | public function setIsDefault($is_default) |
| 346 | 346 | { |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | /** |
| 363 | 363 | * Sets the value of ranges. |
| 364 | 364 | * |
| 365 | - * @param Doctrine\Common\Collections\ArrayCollection $ranges the ranges |
|
| 365 | + * @param ArrayCollection $ranges the ranges |
|
| 366 | 366 | * |
| 367 | 367 | * @return self |
| 368 | 368 | */ |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * |
| 134 | 134 | * @param int $publication |
| 135 | 135 | * |
| 136 | - * @return int |
|
| 136 | + * @return SubscriptionSpecification |
|
| 137 | 137 | */ |
| 138 | 138 | public function setPublication($publication) |
| 139 | 139 | { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * |
| 158 | 158 | * @param int $issue |
| 159 | 159 | * |
| 160 | - * @return int |
|
| 160 | + * @return SubscriptionSpecification |
|
| 161 | 161 | */ |
| 162 | 162 | public function setIssue($issue) |
| 163 | 163 | { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * |
| 182 | 182 | * @param int $section |
| 183 | 183 | * |
| 184 | - * @return int |
|
| 184 | + * @return SubscriptionSpecification |
|
| 185 | 185 | */ |
| 186 | 186 | public function setSection($section) |
| 187 | 187 | { |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | * |
| 206 | 206 | * @param int $article |
| 207 | 207 | * |
| 208 | - * @return int |
|
| 208 | + * @return SubscriptionSpecification |
|
| 209 | 209 | */ |
| 210 | 210 | public function setArticle($article) |
| 211 | 211 | { |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | * |
| 230 | 230 | * @param bool $is_active |
| 231 | 231 | * |
| 232 | - * @return bool |
|
| 232 | + * @return SubscriptionSpecification |
|
| 233 | 233 | */ |
| 234 | 234 | public function setIsActive($is_active) |
| 235 | 235 | { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | /** |
| 242 | 242 | * Get specification create date. |
| 243 | 243 | * |
| 244 | - * @return datetime |
|
| 244 | + * @return string |
|
| 245 | 245 | */ |
| 246 | 246 | public function getCreatedAt() |
| 247 | 247 | { |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | /** |
| 252 | 252 | * Set specification create date. |
| 253 | 253 | * |
| 254 | - * @param datetime $created_at |
|
| 254 | + * @param \DateTime $created_at |
|
| 255 | 255 | * |
| 256 | - * @return datetime |
|
| 256 | + * @return SubscriptionSpecification |
|
| 257 | 257 | */ |
| 258 | 258 | public function setCreatedAt(\DateTime $created_at) |
| 259 | 259 | { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * |
| 127 | 127 | * @param bool $hadTrial |
| 128 | 128 | * |
| 129 | - * @return bool |
|
| 129 | + * @return Trial |
|
| 130 | 130 | */ |
| 131 | 131 | public function setHadTrial($hadTrial) |
| 132 | 132 | { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @param datetime $finishTrial |
| 152 | 152 | * |
| 153 | - * @return datetime |
|
| 153 | + * @return Trial |
|
| 154 | 154 | */ |
| 155 | 155 | public function setFinishTrial($finishTrial) |
| 156 | 156 | { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * |
| 175 | 175 | * @param bool $is_active |
| 176 | 176 | * |
| 177 | - * @return bool |
|
| 177 | + * @return Trial |
|
| 178 | 178 | */ |
| 179 | 179 | public function setIsActive($is_active) |
| 180 | 180 | { |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * Get create date. |
| 188 | 188 | * |
| 189 | - * @return datetime |
|
| 189 | + * @return string |
|
| 190 | 190 | */ |
| 191 | 191 | public function getCreatedAt() |
| 192 | 192 | { |
@@ -196,9 +196,9 @@ discard block |
||
| 196 | 196 | /** |
| 197 | 197 | * Set create date. |
| 198 | 198 | * |
| 199 | - * @param datetime $created_at |
|
| 199 | + * @param \DateTime $created_at |
|
| 200 | 200 | * |
| 201 | - * @return datetime |
|
| 201 | + * @return Trial |
|
| 202 | 202 | */ |
| 203 | 203 | public function setCreatedAt(\DateTime $created_at) |
| 204 | 204 | { |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | /** |
| 264 | 264 | * Set subscription. |
| 265 | 265 | * |
| 266 | - * @param Newscoop\PaywallBundle\Entity\Subscription $subscription |
|
| 266 | + * @param integer $subscription |
|
| 267 | 267 | */ |
| 268 | 268 | public function setSubscription($subscription) |
| 269 | 269 | { |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | * |
| 310 | 310 | * @param Newscoop\Entity\Publication $publication |
| 311 | 311 | * |
| 312 | - * @return Newscoop\Entity\Subscription |
|
| 312 | + * @return UserSubscription |
|
| 313 | 313 | */ |
| 314 | 314 | public function setPublication(Publication $publication) |
| 315 | 315 | { |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | * |
| 354 | 354 | * @param float $toPay |
| 355 | 355 | * |
| 356 | - * @return Newscoop\Entity\Subscription |
|
| 356 | + * @return UserSubscription |
|
| 357 | 357 | */ |
| 358 | 358 | public function setToPay($toPay) |
| 359 | 359 | { |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | * |
| 378 | 378 | * @param float $toPay |
| 379 | 379 | * |
| 380 | - * @return Newscoop\Entity\Subscription |
|
| 380 | + * @return UserSubscription |
|
| 381 | 381 | */ |
| 382 | 382 | public function setPrice($toPay) |
| 383 | 383 | { |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * |
| 402 | 402 | * @param string $type |
| 403 | 403 | * |
| 404 | - * @return Newscoop\Entity\Subscription |
|
| 404 | + * @return UserSubscription |
|
| 405 | 405 | */ |
| 406 | 406 | public function setType($type) |
| 407 | 407 | { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | * |
| 436 | 436 | * @param bool $active |
| 437 | 437 | * |
| 438 | - * @return Newscoop\Entity\Subscription |
|
| 438 | + * @return UserSubscription |
|
| 439 | 439 | */ |
| 440 | 440 | public function setActive($active) |
| 441 | 441 | { |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | /** |
| 471 | 471 | * Set currency. |
| 472 | 472 | * |
| 473 | - * @return string |
|
| 473 | + * @return UserSubscription |
|
| 474 | 474 | */ |
| 475 | 475 | public function setCurrency($currency) |
| 476 | 476 | { |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | /** |
| 493 | 493 | * Set trial. |
| 494 | 494 | * |
| 495 | - * @return Trial |
|
| 495 | + * @return UserSubscription |
|
| 496 | 496 | */ |
| 497 | 497 | public function setTrial($trial) |
| 498 | 498 | { |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | /** |
| 505 | 505 | * Get create date. |
| 506 | 506 | * |
| 507 | - * @return datetime |
|
| 507 | + * @return \DateTime |
|
| 508 | 508 | */ |
| 509 | 509 | public function getCreatedAt() |
| 510 | 510 | { |
@@ -514,9 +514,9 @@ discard block |
||
| 514 | 514 | /** |
| 515 | 515 | * Set create date. |
| 516 | 516 | * |
| 517 | - * @param datetime $created_at |
|
| 517 | + * @param \DateTime $created_at |
|
| 518 | 518 | * |
| 519 | - * @return datetime |
|
| 519 | + * @return UserSubscription |
|
| 520 | 520 | */ |
| 521 | 521 | public function setCreatedAt(\DateTime $created_at) |
| 522 | 522 | { |
@@ -538,9 +538,9 @@ discard block |
||
| 538 | 538 | /** |
| 539 | 539 | * Set expire date. |
| 540 | 540 | * |
| 541 | - * @param datetime $expire_at |
|
| 541 | + * @param \DateTime $expire_at |
|
| 542 | 542 | * |
| 543 | - * @return datetime |
|
| 543 | + * @return UserSubscription |
|
| 544 | 544 | */ |
| 545 | 545 | public function setExpireAt(\DateTime $expire_at = null) |
| 546 | 546 | { |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | * |
| 565 | 565 | * @param bool $is_active |
| 566 | 566 | * |
| 567 | - * @return bool |
|
| 567 | + * @return UserSubscription |
|
| 568 | 568 | */ |
| 569 | 569 | public function setIsActive($is_active) |
| 570 | 570 | { |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | /** |
| 625 | 625 | * Gets the value of updated. |
| 626 | 626 | * |
| 627 | - * @return DateTime |
|
| 627 | + * @return \DateTime |
|
| 628 | 628 | */ |
| 629 | 629 | public function getUpdated() |
| 630 | 630 | { |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | /** |
| 635 | 635 | * Sets the value of updated. |
| 636 | 636 | * |
| 637 | - * @param DateTime $updated the updated |
|
| 637 | + * @param \DateTime $updated the updated |
|
| 638 | 638 | * |
| 639 | 639 | * @return self |
| 640 | 640 | */ |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | /** |
| 985 | 985 | * Gets the value of startsAt. |
| 986 | 986 | * |
| 987 | - * @return DateTime |
|
| 987 | + * @return \DateTime |
|
| 988 | 988 | */ |
| 989 | 989 | public function getStartsAt() |
| 990 | 990 | { |
@@ -994,7 +994,7 @@ discard block |
||
| 994 | 994 | /** |
| 995 | 995 | * Sets the value of startsAt. |
| 996 | 996 | * |
| 997 | - * @param DateTime $startsAt the starts at |
|
| 997 | + * @param \DateTime $startsAt the starts at |
|
| 998 | 998 | * |
| 999 | 999 | * @return self |
| 1000 | 1000 | */ |
@@ -795,7 +795,7 @@ |
||
| 795 | 795 | return $this->modifications; |
| 796 | 796 | } |
| 797 | 797 | |
| 798 | - return $this->modifications->filter(function (Modification $modification) use ($type) { |
|
| 798 | + return $this->modifications->filter(function(Modification $modification) use ($type) { |
|
| 799 | 799 | return $type === $modification->getLabel(); |
| 800 | 800 | }); |
| 801 | 801 | } |
@@ -139,6 +139,9 @@ |
||
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | + /** |
|
| 143 | + * @return string |
|
| 144 | + */ |
|
| 142 | 145 | private function getUser($subscription) |
| 143 | 146 | { |
| 144 | 147 | $user = null; |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Construct. |
| 23 | 23 | * |
| 24 | - * @param CurrencyConverter $converter |
|
| 25 | 24 | */ |
| 26 | 25 | public function __construct(CurrencyContextInterface $context) |
| 27 | 26 | { |
@@ -79,8 +79,6 @@ discard block |
||
| 79 | 79 | * Sends email notifications. |
| 80 | 80 | * |
| 81 | 81 | * @param string $code Email message type |
| 82 | - * @param Newscoop\Entity\User $user User object |
|
| 83 | - * @param PaywallBundle\Entity\UserSubscription $userSubscription User's subscription |
|
| 84 | 82 | */ |
| 85 | 83 | public function sendNotification($code, array $recipients = array(), array $data = array()) |
| 86 | 84 | { |
@@ -124,6 +122,9 @@ discard block |
||
| 124 | 122 | ); |
| 125 | 123 | } |
| 126 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $code |
|
| 127 | + */ |
|
| 127 | 128 | private function loadProperMessageTemplateBy($code) |
| 128 | 129 | { |
| 129 | 130 | switch ($code) { |
@@ -192,7 +193,6 @@ discard block |
||
| 192 | 193 | * notifications to users. |
| 193 | 194 | * |
| 194 | 195 | * @param \DateTime $now Current date time |
| 195 | - * @param int $subscriptionsCount Subscriptions count |
|
| 196 | 196 | */ |
| 197 | 197 | public function processExpiringSubscriptions($now, $notify, $count = 0, $days = 7) |
| 198 | 198 | { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * Calculates prices including all discounts. |
| 44 | 44 | * |
| 45 | 45 | * @param array $items array of subscription identifiers and its periods |
| 46 | - * @param string $surrency currency |
|
| 46 | + * @param string $currency currency |
|
| 47 | 47 | * |
| 48 | 48 | * @return OrderInterface |
| 49 | 49 | */ |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author Rafał Muszyński <[email protected]> |
|
| 4 | - * @copyright 2015 Sourcefabric z.ú. |
|
| 5 | - * @license http://www.gnu.org/licenses/gpl-3.0.txt |
|
| 6 | - */ |
|
| 3 | + * @author Rafał Muszyński <[email protected]> |
|
| 4 | + * @copyright 2015 Sourcefabric z.ú. |
|
| 5 | + * @license http://www.gnu.org/licenses/gpl-3.0.txt |
|
| 6 | + */ |
|
| 7 | 7 | namespace Newscoop\PaywallBundle\EventListener; |
| 8 | 8 | |
| 9 | 9 | use Newscoop\EventDispatcher\Events\PluginHooksEvent; |