Completed
Pull Request — 1.11.x (#1690)
by José
30:17
created
plugin/buycourses/src/buy_course_plugin.class.php 1 patch
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     /**
52 52
      *
53
-     * @return StaticPlugin
53
+     * @return BuyCoursesPlugin
54 54
      */
55 55
     static function create()
56 56
     {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     /**
279 279
      * Save a transfer account information
280 280
      * @param array $params The transfer account
281
-     * @return int Rows affected. Otherwise return false
281
+     * @return false|string Rows affected. Otherwise return false
282 282
      */
283 283
     public function saveTransferAccount($params)
284 284
     {
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
     /**
692 692
      * Get session info
693 693
      * @param array $sessionId The session ID
694
-     * @return array
694
+     * @return Session
695 695
      */
696 696
     public function getSessionInfo($sessionId)
697 697
     {
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
      * Register a sale
785 785
      * @param int $itemId The product ID
786 786
      * @param int $paymentType The payment type
787
-     * @return boolean
787
+     * @return false|string
788 788
      */
789 789
     public function registerSale($itemId, $paymentType)
790 790
     {
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
 
967 967
     /**
968 968
      * Get payment types
969
-     * @return array
969
+     * @return string[]
970 970
      */
971 971
     public function getPaymentTypes()
972 972
     {
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 
1006 1006
     /**
1007 1007
      * Get the statuses for sales
1008
-     * @return array
1008
+     * @return string[]
1009 1009
      */
1010 1010
     public function getSaleStatuses()
1011 1011
     {
@@ -1018,7 +1018,7 @@  discard block
 block discarded – undo
1018 1018
 
1019 1019
     /**
1020 1020
      * Get the statuses for Payouts
1021
-     * @return array
1021
+     * @return string[]
1022 1022
      */
1023 1023
     public function getPayoutStatuses()
1024 1024
     {
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 
1032 1032
     /**
1033 1033
      * Get the list of product types
1034
-     * @return array
1034
+     * @return string[]
1035 1035
      */
1036 1036
     public function getProductTypes()
1037 1037
     {
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
     /**
1045 1045
      * Get the list of service types
1046
-     * @return array
1046
+     * @return string[]
1047 1047
      */
1048 1048
     public function getServiceTypes()
1049 1049
     {
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
     /**
1427 1427
      * Register a item
1428 1428
      * @param array $itemData The item data
1429
-     * @return int The item ID. Otherwise return false
1429
+     * @return false|string The item ID. Otherwise return false
1430 1430
      */
1431 1431
     public function registerItem(array $itemData)
1432 1432
     {
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
     /**
1585 1585
      * Verify if the beneficiary have a paypal account
1586 1586
      * @param int $userId
1587
-     * @return true if the user have a paypal account, false if not
1587
+     * @return boolean if the user have a paypal account, false if not
1588 1588
      */
1589 1589
     public function verifyPaypalAccountByBeneficiary($userId)
1590 1590
     {
@@ -1706,7 +1706,7 @@  discard block
 block discarded – undo
1706 1706
     /**
1707 1707
      * Register addicional service
1708 1708
      * @param array params $service
1709
-     * @return mixed response
1709
+     * @return false|string response
1710 1710
      */
1711 1711
     public function storeService($service)
1712 1712
     {
@@ -1862,7 +1862,7 @@  discard block
 block discarded – undo
1862 1862
 
1863 1863
     /**
1864 1864
      * Get the statuses for sales
1865
-     * @return array
1865
+     * @return string[]
1866 1866
      */
1867 1867
     public function getServiceSaleStatuses()
1868 1868
     {
@@ -2123,7 +2123,7 @@  discard block
 block discarded – undo
2123 2123
      * @param int $paymentType The payment type
2124 2124
      * @param int $infoSelect The ID for Service Type
2125 2125
      * @param int $trial trial mode
2126
-     * @return boolean
2126
+     * @return false|string
2127 2127
      */
2128 2128
     public function registerServiceSale($serviceId, $paymentType, $infoSelect, $trial = null)
2129 2129
     {
Please login to merge, or discard this patch.
main/lp/lp_final_item.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 $_in_course = true;
10 10
 
11
-require_once __DIR__ . '/../inc/global.inc.php';
11
+require_once __DIR__.'/../inc/global.inc.php';
12 12
 
13 13
 $current_course_tool = TOOL_GRADEBOOK;
14 14
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 'normal',
52 52
                 false
53 53
             ),
54
-            api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'
54
+            api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'
55 55
         );
56 56
         $tpl->assign('content', $content);
57 57
         $tpl->display_blank_template();
@@ -201,19 +201,19 @@  discard block
 block discarded – undo
201 201
                 <div class='row'>
202 202
                     <div class='col-md-2 col-xs-4'>
203 203
                         <div class='thumbnail'>
204
-                          <img class='skill-badge-img' src='" . $skill->getWebIconPath() . "' >
204
+                          <img class='skill-badge-img' src='" . $skill->getWebIconPath()."' >
205 205
                         </div>
206 206
                     </div>
207 207
                     <div class='col-md-8 col-xs-8'>
208
-                        <h5><b>" . $skill->getName() . "</b></h5>
209
-                        " . $skill->getDescription() . "
208
+                        <h5><b>" . $skill->getName()."</b></h5>
209
+                        " . $skill->getDescription()."
210 210
                     </div>
211 211
                     <div class='col-md-2 col-xs-12'>
212
-                        <h5><b>" . get_lang('ShareWithYourFriends') . "</b></h5>
213
-                        <a href='http://www.facebook.com/sharer.php?u=" . api_get_path(WEB_PATH) . "badge/" . $skill->getId() . "/user/" . $userId . "' target='_new'>
212
+                        <h5><b>" . get_lang('ShareWithYourFriends')."</b></h5>
213
+                        <a href='http://www.facebook.com/sharer.php?u=" . api_get_path(WEB_PATH)."badge/".$skill->getId()."/user/".$userId."' target='_new'>
214 214
                             <em class='fa fa-facebook-square fa-3x text-info' aria-hidden='true'></em>
215 215
                         </a>
216
-                        <a href='https://twitter.com/home?status=" . sprintf(get_lang('IHaveObtainedSkillXOnY'), '"' . $skill->getName() . '"', api_get_setting('siteName')) . ' - ' . api_get_path(WEB_PATH) . 'badge/' . $skill->getId() . '/user/' . $userId . "' target='_new'>
216
+                        <a href='https://twitter.com/home?status=" . sprintf(get_lang('IHaveObtainedSkillXOnY'), '"'.$skill->getName().'"', api_get_setting('siteName')).' - '.api_get_path(WEB_PATH).'badge/'.$skill->getId().'/user/'.$userId."' target='_new'>
217 217
                             <em class='fa fa-twitter-square fa-3x text-light' aria-hidden='true'></em>
218 218
                         </a>
219 219
                     </div>
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $badgeLink .= "
224 224
             <div class='panel panel-default'>
225 225
                 <div class='panel-body'>
226
-                    <h3 class='text-center'>" . get_lang('AdditionallyYouHaveObtainedTheFollowingSkills') . "</h3>
226
+                    <h3 class='text-center'>" . get_lang('AdditionallyYouHaveObtainedTheFollowingSkills')."</h3>
227 227
                     $skillList
228 228
                 </div>
229 229
             </div>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 function generateLPFinalItemTemplateCertificateLinks($certificate)
241 241
 {
242 242
     $downloadCertificateLink = Display::url(
243
-        Display::returnFontAwesomeIcon('file-pdf-o') . get_lang('DownloadCertificatePdf'),
243
+        Display::returnFontAwesomeIcon('file-pdf-o').get_lang('DownloadCertificatePdf'),
244 244
         $certificate['pdf_url'],
245 245
         ['class' => 'btn btn-default']
246 246
     );
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     $downloadCertificateLink = "
249 249
         <div class='panel panel-default'>
250 250
             <div class='panel-body'>
251
-                <h3 class='text-center'>" . get_lang('NowDownloadYourCertificateClickHere') . "</h3>
251
+                <h3 class='text-center'>" . get_lang('NowDownloadYourCertificateClickHere')."</h3>
252 252
                 <div class='text-center'>$downloadCertificateLink $viewCertificateLink</div>
253 253
             </div>
254 254
         </div>
Please login to merge, or discard this patch.
plugin/buycourses/src/service_process.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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();
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 $typeUser = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_USER;
39 39
 $typeCourse = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_COURSE;
40 40
 $typeSession = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_SESSION;
41
-$typeFinalLp= intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_LP_FINAL_ITEM;
42
-$queryString = 'i=' . intval($_REQUEST['i']) . '&t=' . intval($_REQUEST['t']).$additionalQueryString;
41
+$typeFinalLp = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_LP_FINAL_ITEM;
42
+$queryString = 'i='.intval($_REQUEST['i']).'&t='.intval($_REQUEST['t']).$additionalQueryString;
43 43
 
44 44
 $serviceInfo = $plugin->getServices(intval($_REQUEST['i']));
45 45
 $userInfo = api_get_user_info($currentUserId);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         Display::addFlash(
54 54
             Display::return_message($plugin->get_lang('NeedToSelectPaymentType'), 'error', false)
55 55
         );
56
-        header('Location:' . api_get_self() . '?' . $queryString);
56
+        header('Location:'.api_get_self().'?'.$queryString);
57 57
         exit;
58 58
     }
59 59
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         Display::addFlash(
62 62
             Display::return_message($plugin->get_lang('AdditionalInfoRequired'), 'error', false)
63 63
         );
64
-        header('Location:' . api_get_self() . '?' . $queryString);
64
+        header('Location:'.api_get_self().'?'.$queryString);
65 65
         exit;
66 66
     }
67 67
     
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     if ($serviceSaleId !== false) {
71 71
         $_SESSION['bc_service_sale_id'] = $serviceSaleId;
72 72
 
73
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php');
73
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php');
74 74
     }
75 75
 
76 76
     exit;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 if ($typeUser) {
103 103
     $users = $em->getRepository('ChamiloUserBundle:User')->findAll();
104
-    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . ' (' . get_lang('Myself') . ')';
104
+    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']).' ('.get_lang('Myself').')';
105 105
     if (!empty($users)) {
106 106
         foreach ($users as $user) {
107 107
             if (intval($userInfo['user_id']) !== intval($user->getId())) {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $thisLpList = $em->getRepository('ChamiloCourseBundle:CLp')->findBy(['cId' => $course->getCourse()->getId()]);
147 147
         foreach ($thisLpList as $lp) {
148 148
 
149
-            $courseLpList[$lp->getCId()] = $lp->getName() . ' (' . $course->getCourse()->getTitle() . ')';;
149
+            $courseLpList[$lp->getCId()] = $lp->getName().' ('.$course->getCourse()->getTitle().')'; ;
150 150
         }
151 151
     }
152 152
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 //Now only we need the final item and return the current LP
164 164
                 if ($item->getItemType() == TOOL_LP_FINAL_ITEM) {
165 165
                     $checker = true;
166
-                    $sessionLpList[$lp->getCId()] = $lp->getName() . ' (' . $session->getSession()->getName() . ')';
166
+                    $sessionLpList[$lp->getCId()] = $lp->getName().' ('.$session->getSession()->getName().')';
167 167
                 }
168 168
             }
169 169
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 //Now only we need the final item and return the current LP
179 179
                 if ($item->getItemType() == TOOL_LP_FINAL_ITEM) {
180 180
                     $checker = true;
181
-                    $sessionLpList[$lp->getCId()] = $lp->getName() . ' (' . $session->getSession()->getName() . ')';
181
+                    $sessionLpList[$lp->getCId()] = $lp->getName().' ('.$session->getSession()->getName().')';
182 182
                 }
183 183
             }
184 184
         }
Please login to merge, or discard this patch.