@@ -30,7 +30,7 @@ |
||
| 30 | 30 | 'invalid_message' => 'paywall.manage.error.currency', |
| 31 | 31 | 'required' => true, |
| 32 | 32 | )) |
| 33 | - ->add('type', 'choice', array( |
|
| 33 | + ->add('type', 'choice', array( |
|
| 34 | 34 | 'label' => 'paywall.manage.label.paymenttype', |
| 35 | 35 | 'choices' => array( |
| 36 | 36 | 'P' => 'paywall.manage.label.paid', |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function filterRanges(Subscription $subscription, $periodId) |
| 39 | 39 | { |
| 40 | - $ranges = $subscription->getRanges()->filter(function (Duration $duration) use ($periodId) { |
|
| 40 | + $ranges = $subscription->getRanges()->filter(function(Duration $duration) use ($periodId) { |
|
| 41 | 41 | return $duration->getId() == $periodId; |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | foreach ($orderItems as $value) { |
| 97 | 97 | $parent = $item->getParent(); |
| 98 | 98 | if ($item->getSubscription()->getId() == $value->getSubscription()->getId() && |
| 99 | - $parent == $value |
|
| 99 | + $parent == $value |
|
| 100 | 100 | ) { |
| 101 | 101 | $value->setProlonged(true); |
| 102 | 102 | $value->setToPay($parent->getToPay()); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | /** |
| 358 | 358 | * Gets all available sections by given language Id. |
| 359 | 359 | * |
| 360 | - * @param int $language Language Id to search for |
|
| 360 | + * @param int $languageId Language Id to search for |
|
| 361 | 361 | * |
| 362 | 362 | * @return array |
| 363 | 363 | */ |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | * |
| 531 | 531 | * @param UserSubscription $userSubscription User subscription |
| 532 | 532 | * |
| 533 | - * @return DateTime |
|
| 533 | + * @return null|\DateTime |
|
| 534 | 534 | */ |
| 535 | 535 | public function getExpirationDate(UserSubscription $userSubscription) |
| 536 | 536 | { |
@@ -211,6 +211,9 @@ |
||
| 211 | 211 | return $em->getRepository('Newscoop\PaywallBundle\Entity\Order'); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | + /** |
|
| 215 | + * @param string $locale |
|
| 216 | + */ |
|
| 214 | 217 | private function getActiveSubscriptions($locale) |
| 215 | 218 | { |
| 216 | 219 | $em = $this->get('em'); |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | if ($options !== '') { |
| 101 | - $html .= '<select name="batchorder['.$subscription['id'].']"><option value="">'.$p_params['choose_text'].'</option>'.$options.'</select><br>'; |
|
| 101 | + $html .= '<select name="batchorder['.$subscription['id'].']"><option value="">'.$p_params['choose_text'].'</option>'.$options.'</select><br>'; |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -7,10 +7,8 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * Function to check if user has access to content. |
| 9 | 9 | * |
| 10 | - * @param array $params |
|
| 11 | - * @param object $smarty |
|
| 12 | 10 | * |
| 13 | - * @return string |
|
| 11 | + * @return boolean |
|
| 14 | 12 | */ |
| 15 | 13 | function smarty_modifier_has_subscription($user) |
| 16 | 14 | { |