@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $includeSessions = $plugin->get('include_sessions') === 'true'; |
15 | 15 | $includeServices = $plugin->get('include_services') === 'true'; |
16 | 16 | |
17 | -if (!$includeSessions) { |
|
17 | +if (!$includeSessions) { |
|
18 | 18 | api_not_allowed(true); |
19 | 19 | } |
20 | 20 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | FormValidator::LAYOUT_INLINE |
32 | 32 | ); |
33 | 33 | |
34 | -if ($form->validate()) { |
|
34 | +if ($form->validate()) { |
|
35 | 35 | $formValues = $form->getSubmitValues(); |
36 | 36 | $nameFilter = isset($formValues['name']) ? $formValues['name'] : null; |
37 | 37 | $minFilter = isset($formValues['min']) ? $formValues['min'] : 0; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $sessionList = $plugin->getCatalogSessionList($nameFilter, $minFilter, $maxFilter); |
59 | 59 | |
60 | 60 | // View |
61 | -if (api_is_platform_admin()) { |
|
61 | +if (api_is_platform_admin()) { |
|
62 | 62 | $interbreadcrumb[] = [ |
63 | 63 | 'url' => 'configuration.php', |
64 | 64 | 'name' => $plugin->get_lang('AvailableCoursesConfiguration') |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $score = (float) $row_dates['exe_result']; |
280 | 280 | $max_score = (float) $row_dates['exe_weighting']; |
281 | 281 | |
282 | - $sql = "UPDATE $TBL_LP_ITEM SET |
|
282 | + $sql = "update $TBL_LP_ITEM SET |
|
283 | 283 | max_score = '$max_score' |
284 | 284 | WHERE c_id = $course_id AND id = '".$safe_item_id."'"; |
285 | 285 | Database::query($sql); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | } |
314 | 314 | } |
315 | 315 | |
316 | - $sql = "UPDATE $TBL_LP_ITEM_VIEW SET |
|
316 | + $sql = "update $TBL_LP_ITEM_VIEW SET |
|
317 | 317 | status = '$status', |
318 | 318 | score = $score, |
319 | 319 | total_time = $mytime |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } |
325 | 325 | Database::query($sql); |
326 | 326 | |
327 | - $sql = "UPDATE $TBL_TRACK_EXERCICES SET |
|
327 | + $sql = "update $TBL_TRACK_EXERCICES SET |
|
328 | 328 | orig_lp_item_view_id = $lp_item_view_id |
329 | 329 | WHERE exe_id = ".$safe_exe_id; |
330 | 330 | Database::query($sql); |
@@ -57,11 +57,11 @@ |
||
57 | 57 | */ |
58 | 58 | private $updatedAt; |
59 | 59 | |
60 | - /** |
|
61 | - * Get id |
|
62 | - * |
|
63 | - * @return integer |
|
64 | - */ |
|
60 | + /** |
|
61 | + * Get id |
|
62 | + * |
|
63 | + * @return integer |
|
64 | + */ |
|
65 | 65 | public function getId() |
66 | 66 | { |
67 | 67 | return $this->id; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * Close connection |
138 | 138 | * |
139 | - * @return void |
|
139 | + * @return boolean |
|
140 | 140 | * @author Dmitry (dio) Levashov |
141 | 141 | **/ |
142 | 142 | public function umount() |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | * Close opened file |
499 | 499 | * |
500 | 500 | * @param resource $fp file pointer |
501 | - * @return bool |
|
501 | + * @return boolean|null |
|
502 | 502 | * @author Dmitry (dio) Levashov |
503 | 503 | **/ |
504 | 504 | protected function _fclose($fp, $path = '') |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | * |
517 | 517 | * @param string $path parent dir path |
518 | 518 | * @param string $name new directory name |
519 | - * @return string|bool |
|
519 | + * @return string|false |
|
520 | 520 | * @author Dmitry (dio) Levashov |
521 | 521 | **/ |
522 | 522 | protected function _mkdir($path, $name) |
@@ -305,7 +305,8 @@ |
||
305 | 305 | protected function loadFilePath($path) |
306 | 306 | { |
307 | 307 | $realPath = realpath($path); |
308 | - if (DIRECTORY_SEPARATOR == '\\') { // windows |
|
308 | + if (DIRECTORY_SEPARATOR == '\\') { |
|
309 | +// windows |
|
309 | 310 | $realPath = str_replace('\\', '\\\\', $realPath); |
310 | 311 | } |
311 | 312 | return $this->db->real_escape_string($realPath); |
@@ -184,7 +184,7 @@ |
||
184 | 184 | /** |
185 | 185 | * @inheritdoc |
186 | 186 | */ |
187 | - public function processAnswersCreation($form, $exercise) |
|
187 | + public function processAnswersCreation($form, $exercise) |
|
188 | 188 | { |
189 | 189 | $questionWeighting = $nbrGoodAnswers = 0; |
190 | 190 | $objAnswer = new Answer($this->id); |
@@ -185,7 +185,7 @@ |
||
185 | 185 | * @inheritdoc |
186 | 186 | */ |
187 | 187 | public function processAnswersCreation($form, $exercise) |
188 | - { |
|
188 | + { |
|
189 | 189 | $questionWeighting = $nbrGoodAnswers = 0; |
190 | 190 | $objAnswer = new Answer($this->id); |
191 | 191 | $nb_answers = $form->getSubmitValue('nb_answers'); |
@@ -177,8 +177,8 @@ |
||
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
180 | - * @inheritdoc |
|
181 | - */ |
|
180 | + * @inheritdoc |
|
181 | + */ |
|
182 | 182 | public function processAnswersCreation($form, $exercise) |
183 | 183 | { |
184 | 184 | $questionWeighting = $nbrGoodAnswers = 0; |
@@ -30,8 +30,8 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
33 | - * @inheritdoc |
|
34 | - */ |
|
33 | + * @inheritdoc |
|
34 | + */ |
|
35 | 35 | public function createForm(&$form, $exercise) |
36 | 36 | { |
37 | 37 | parent::createForm($form, $exercise); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | /** |
296 | 296 | * Save a transfer account information |
297 | 297 | * @param array $params The transfer account |
298 | - * @return int Rows affected. Otherwise return false |
|
298 | + * @return false|string Rows affected. Otherwise return false |
|
299 | 299 | */ |
300 | 300 | public function saveTransferAccount($params) |
301 | 301 | { |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | /** |
733 | 733 | * Get session info |
734 | 734 | * @param array $sessionId The session ID |
735 | - * @return array |
|
735 | + * @return Session |
|
736 | 736 | */ |
737 | 737 | public function getSessionInfo($sessionId) |
738 | 738 | { |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | * Register a sale |
826 | 826 | * @param int $itemId The product ID |
827 | 827 | * @param int $paymentType The payment type |
828 | - * @return boolean |
|
828 | + * @return false|string |
|
829 | 829 | */ |
830 | 830 | public function registerSale($itemId, $paymentType) |
831 | 831 | { |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | |
1006 | 1006 | /** |
1007 | 1007 | * Get payment types |
1008 | - * @return array |
|
1008 | + * @return string[] |
|
1009 | 1009 | */ |
1010 | 1010 | public function getPaymentTypes() |
1011 | 1011 | { |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | |
1045 | 1045 | /** |
1046 | 1046 | * Get the statuses for sales |
1047 | - * @return array |
|
1047 | + * @return string[] |
|
1048 | 1048 | */ |
1049 | 1049 | public function getSaleStatuses() |
1050 | 1050 | { |
@@ -1057,7 +1057,7 @@ discard block |
||
1057 | 1057 | |
1058 | 1058 | /** |
1059 | 1059 | * Get the statuses for Payouts |
1060 | - * @return array |
|
1060 | + * @return string[] |
|
1061 | 1061 | */ |
1062 | 1062 | public function getPayoutStatuses() |
1063 | 1063 | { |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | |
1071 | 1071 | /** |
1072 | 1072 | * Get the list of product types |
1073 | - * @return array |
|
1073 | + * @return string[] |
|
1074 | 1074 | */ |
1075 | 1075 | public function getProductTypes() |
1076 | 1076 | { |
@@ -1082,7 +1082,7 @@ discard block |
||
1082 | 1082 | |
1083 | 1083 | /** |
1084 | 1084 | * Get the list of service types |
1085 | - * @return array |
|
1085 | + * @return string[] |
|
1086 | 1086 | */ |
1087 | 1087 | public function getServiceTypes() |
1088 | 1088 | { |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | /** |
1471 | 1471 | * Register a item |
1472 | 1472 | * @param array $itemData The item data |
1473 | - * @return int The item ID. Otherwise return false |
|
1473 | + * @return false|string The item ID. Otherwise return false |
|
1474 | 1474 | */ |
1475 | 1475 | public function registerItem(array $itemData) |
1476 | 1476 | { |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | /** |
1626 | 1626 | * Verify if the beneficiary have a paypal account |
1627 | 1627 | * @param int $userId |
1628 | - * @return true if the user have a paypal account, false if not |
|
1628 | + * @return boolean if the user have a paypal account, false if not |
|
1629 | 1629 | */ |
1630 | 1630 | public function verifyPaypalAccountByBeneficiary($userId) |
1631 | 1631 | { |
@@ -1746,7 +1746,7 @@ discard block |
||
1746 | 1746 | * Register additional service |
1747 | 1747 | * @param array $service params |
1748 | 1748 | * |
1749 | - * @return mixed response |
|
1749 | + * @return false|string response |
|
1750 | 1750 | */ |
1751 | 1751 | public function storeService($service) |
1752 | 1752 | { |
@@ -1909,7 +1909,7 @@ discard block |
||
1909 | 1909 | |
1910 | 1910 | /** |
1911 | 1911 | * Get the statuses for sales |
1912 | - * @return array |
|
1912 | + * @return string[] |
|
1913 | 1913 | */ |
1914 | 1914 | public function getServiceSaleStatuses() |
1915 | 1915 | { |
@@ -2177,7 +2177,7 @@ discard block |
||
2177 | 2177 | * @param int $paymentType The payment type |
2178 | 2178 | * @param int $infoSelect The ID for Service Type |
2179 | 2179 | * @param int $trial trial mode |
2180 | - * @return boolean |
|
2180 | + * @return false|string |
|
2181 | 2181 | */ |
2182 | 2182 | public function registerServiceSale($serviceId, $paymentType, $infoSelect, $trial = null) |
2183 | 2183 | { |
@@ -246,7 +246,7 @@ |
||
246 | 246 | $addional_param = ''; |
247 | 247 | if (isset($_GET['additional_profile_field'])) { |
248 | 248 | foreach ($_GET['additional_profile_field'] as $fieldId) { |
249 | - $addional_param .= '&additional_profile_field[]='. (int) $fieldId; |
|
249 | + $addional_param .= '&additional_profile_field[]='.(int) $fieldId; |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | get_lang('HideColumn'), |
115 | 115 | array('align' => 'absmiddle', 'hspace' => '3px'), |
116 | 116 | ICON_SIZE_SMALL |
117 | - )."</div>' |
|
117 | + )."</div>' |
|
118 | 118 | ); |
119 | 119 | } |
120 | 120 | ); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | foreach ($_GET['additional_profile_field'] as $fieldId) { |
202 | - // Fetching only the user that are loaded NOT ALL user in the portal. |
|
202 | + // Fetching only the user that are loaded NOT ALL user in the portal. |
|
203 | 203 | $userProfileInfo[$fieldId] = TrackingCourseLog::getAdditionalProfileInformationOfFieldByUser( |
204 | 204 | $fieldId, |
205 | 205 | $user_array |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | } |
576 | 576 | ob_end_clean(); |
577 | 577 | |
578 | - // Adding headers before the content. |
|
578 | + // Adding headers before the content. |
|
579 | 579 | array_unshift($csv_content, $csv_headers); |
580 | 580 | |
581 | 581 | if ($session_id) { |