@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | /** |
47 | 47 | * |
48 | - * @return StaticPlugin |
|
48 | + * @return BuyCoursesPlugin |
|
49 | 49 | */ |
50 | 50 | static function create() |
51 | 51 | { |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | /** |
269 | 269 | * Save a transfer account information |
270 | 270 | * @param array $params The transfer account |
271 | - * @return int Rows affected. Otherwise return false |
|
271 | + * @return false|string Rows affected. Otherwise return false |
|
272 | 272 | */ |
273 | 273 | public function saveTransferAccount($params) |
274 | 274 | { |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | /** |
681 | 681 | * Get session info |
682 | 682 | * @param array $sessionId The session ID |
683 | - * @return array |
|
683 | + * @return Session |
|
684 | 684 | */ |
685 | 685 | public function getSessionInfo($sessionId) |
686 | 686 | { |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | * Register a sale |
774 | 774 | * @param int $itemId The product ID |
775 | 775 | * @param int $paymentType The payment type |
776 | - * @return boolean |
|
776 | + * @return false|string |
|
777 | 777 | */ |
778 | 778 | public function registerSale($itemId, $paymentType) |
779 | 779 | { |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | |
956 | 956 | /** |
957 | 957 | * Get payment types |
958 | - * @return array |
|
958 | + * @return string[] |
|
959 | 959 | */ |
960 | 960 | public function getPaymentTypes() |
961 | 961 | { |
@@ -994,7 +994,7 @@ discard block |
||
994 | 994 | |
995 | 995 | /** |
996 | 996 | * Get the statuses for sales |
997 | - * @return array |
|
997 | + * @return string[] |
|
998 | 998 | */ |
999 | 999 | public function getSaleStatuses() |
1000 | 1000 | { |
@@ -1007,7 +1007,7 @@ discard block |
||
1007 | 1007 | |
1008 | 1008 | /** |
1009 | 1009 | * Get the statuses for Payouts |
1010 | - * @return array |
|
1010 | + * @return string[] |
|
1011 | 1011 | */ |
1012 | 1012 | public function getPayoutStatuses() |
1013 | 1013 | { |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | |
1021 | 1021 | /** |
1022 | 1022 | * Get the list of product types |
1023 | - * @return array |
|
1023 | + * @return string[] |
|
1024 | 1024 | */ |
1025 | 1025 | public function getProductTypes() |
1026 | 1026 | { |
@@ -1401,7 +1401,7 @@ discard block |
||
1401 | 1401 | /** |
1402 | 1402 | * Register a item |
1403 | 1403 | * @param array $itemData The item data |
1404 | - * @return int The item ID. Otherwise return false |
|
1404 | + * @return false|string The item ID. Otherwise return false |
|
1405 | 1405 | */ |
1406 | 1406 | public function registerItem(array $itemData) |
1407 | 1407 | { |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | /** |
1560 | 1560 | * Verify if the beneficiary have a paypal account |
1561 | 1561 | * @param int $userId |
1562 | - * @return true if the user have a paypal account, false if not |
|
1562 | + * @return boolean if the user have a paypal account, false if not |
|
1563 | 1563 | */ |
1564 | 1564 | public function verifyPaypalAccountByBeneficiary($userId) |
1565 | 1565 | { |
@@ -1681,7 +1681,7 @@ discard block |
||
1681 | 1681 | /** |
1682 | 1682 | * Register addicional service |
1683 | 1683 | * @param array params $service |
1684 | - * @return mixed response |
|
1684 | + * @return string|false response |
|
1685 | 1685 | */ |
1686 | 1686 | public function storeService($service) |
1687 | 1687 | { |
@@ -1838,7 +1838,7 @@ discard block |
||
1838 | 1838 | |
1839 | 1839 | /** |
1840 | 1840 | * Get the statuses for sales |
1841 | - * @return array |
|
1841 | + * @return string[] |
|
1842 | 1842 | */ |
1843 | 1843 | public function getServiceSaleStatuses() |
1844 | 1844 | { |
@@ -2094,7 +2094,7 @@ discard block |
||
2094 | 2094 | * @param int $paymentType The payment type |
2095 | 2095 | * @param int $infoSelect The ID for Service Type |
2096 | 2096 | * @param int $trial trial mode |
2097 | - * @return boolean |
|
2097 | + * @return false|string |
|
2098 | 2098 | */ |
2099 | 2099 | public function registerServiceSale($serviceId, $paymentType, $infoSelect, $trial = null) |
2100 | 2100 | { |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | require_once '../config.php'; |
14 | 14 | |
15 | 15 | if (!isset($_REQUEST['t'], $_REQUEST['i'])) { |
16 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
16 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | $currentUserId = api_get_user_id(); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $typeUser = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_USER; |
38 | 38 | $typeCourse = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_COURSE; |
39 | 39 | $typeSession = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_SESSION; |
40 | -$queryString = 'i=' . intval($_REQUEST['i']) . '&t=' . intval($_REQUEST['t']).$additionalQueryString; |
|
40 | +$queryString = 'i='.intval($_REQUEST['i']).'&t='.intval($_REQUEST['t']).$additionalQueryString; |
|
41 | 41 | |
42 | 42 | $serviceInfo = $plugin->getServices(intval($_REQUEST['i'])); |
43 | 43 | $userInfo = api_get_user_info($currentUserId); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | Display::addFlash( |
52 | 52 | Display::return_message($plugin->get_lang('NeedToSelectPaymentType'), 'error', false) |
53 | 53 | ); |
54 | - header('Location:' . api_get_self() . '?' . $queryString); |
|
54 | + header('Location:'.api_get_self().'?'.$queryString); |
|
55 | 55 | exit; |
56 | 56 | } |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | Display::addFlash( |
60 | 60 | Display::return_message($plugin->get_lang('AdditionalInfoRequired'), 'error', false) |
61 | 61 | ); |
62 | - header('Location:' . api_get_self() . '?' . $queryString); |
|
62 | + header('Location:'.api_get_self().'?'.$queryString); |
|
63 | 63 | exit; |
64 | 64 | } |
65 | 65 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($serviceSaleId !== false) { |
69 | 69 | $_SESSION['bc_service_sale_id'] = $serviceSaleId; |
70 | 70 | |
71 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php'); |
|
71 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | exit; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if ($typeUser) { |
87 | 87 | $users = $em->getRepository('ChamiloUserBundle:User')->findAll(); |
88 | - $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . ' (' . get_lang('Myself') . ')'; |
|
88 | + $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']).' ('.get_lang('Myself').')'; |
|
89 | 89 | if (!empty($users)) { |
90 | 90 | foreach ($users as $user) { |
91 | 91 | if (intval($userInfo['user_id']) !== intval($user->getId())) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false) |
52 | 52 | ); |
53 | 53 | |
54 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
54 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
55 | 55 | exit; |
56 | 56 | } |
57 | 57 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | Display::return_message($erroMessage, 'error', false) |
67 | 67 | ); |
68 | 68 | unset($_SESSION['wizard']); |
69 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
69 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
70 | 70 | exit; |
71 | 71 | } |
72 | 72 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | unset($_SESSION['bc_service_sale_id']); |
152 | 152 | |
153 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
153 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
154 | 154 | |
155 | 155 | exit; |
156 | 156 | } |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | // purchase-specific fields are ignored. This little condition handle this fact. |
40 | 40 | $itemPrice = $serviceSale['price']; |
41 | 41 | |
42 | - $returnUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_success.php'; |
|
43 | - $cancelUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_error.php'; |
|
42 | + $returnUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_success.php'; |
|
43 | + $cancelUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_error.php'; |
|
44 | 44 | |
45 | 45 | // The extra params for handle the hard job, this var is VERY IMPORTANT !! |
46 | 46 | $extra = ''; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $plugin->cancelServiceSale(intval($serviceSale['id'])); |
74 | 74 | |
75 | - header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
75 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
76 | 76 | exit; |
77 | 77 | } |
78 | 78 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | Display::addFlash( |
111 | 111 | Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false) |
112 | 112 | ); |
113 | - header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
113 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
114 | 114 | exit; |
115 | 115 | } |
116 | 116 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | ); |
150 | 150 | |
151 | 151 | unset($_SESSION['bc_service_sale_id']); |
152 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
152 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
153 | 153 | exit; |
154 | 154 | } |
155 | 155 |