Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/user/user_export.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -149,15 +149,15 @@
 block discarded – undo
149 149
 }
150 150
 
151 151
 switch ($file_type) {
152
-    case 'xml':
153
-        Export::arrayToXml($data, $filename, 'Contact', 'Contacts');
154
-        exit;
155
-        break;
156
-    case 'csv':
157
-        Export::arrayToCsv($data, $filename);
158
-        exit;
159
-    case 'xls':
160
-        Export::arrayToXls($data, $filename);
161
-        exit;
162
-        break;
152
+        case 'xml':
153
+            Export::arrayToXml($data, $filename, 'Contact', 'Contacts');
154
+            exit;
155
+            break;
156
+        case 'csv':
157
+            Export::arrayToCsv($data, $filename);
158
+            exit;
159
+        case 'xls':
160
+            Export::arrayToXls($data, $filename);
161
+            exit;
162
+            break;
163 163
 }
164 164
\ No newline at end of file
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/FloatNumber.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
         $this->setType('float');
30 30
     }
31 31
 
32
-     /**
33
-     * @param string $value
34
-     */
32
+        /**
33
+         * @param string $value
34
+         */
35 35
     public function setValue($value)
36 36
     {
37 37
         $value = api_float_val($value);
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function getValue()
49 49
     {
50
-         $value = $this->getAttribute('value');
51
-         $value = api_float_val($value);
50
+            $value = $this->getAttribute('value');
51
+            $value = api_float_val($value);
52 52
 
53
-         return $value;
53
+            return $value;
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
main/admin/legal_add.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 
106 106
 if (isset($_POST['language'])) {
107 107
 
108
-	$form->addElement('static', Security::remove_XSS($_POST['language']));
109
-	$form->addElement('hidden', 'language', Security::remove_XSS($_POST['language']));
108
+    $form->addElement('static', Security::remove_XSS($_POST['language']));
109
+    $form->addElement('hidden', 'language', Security::remove_XSS($_POST['language']));
110 110
     $form->addHtmlEditor(
111 111
         'content',
112 112
         get_lang('Content'),
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 } else {
140 140
     $form->addSelectLanguage('language', get_lang('Language'), null, array());
141
-	$form->addButtonSearch(get_lang('Load'), 'send');
141
+    $form->addButtonSearch(get_lang('Load'), 'send');
142 142
 
143 143
 }
144 144
 
Please login to merge, or discard this patch.
main/inc/lib/course_request.lib.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      * @param string $objectives
52 52
      * @param string $target_audience
53 53
      * @param int $user_id
54
-     * @return mixed The database id of the newly created course request or FALSE on failure.
54
+     * @return false|string The database id of the newly created course request or FALSE on failure.
55 55
      */
56 56
     public static function create_course_request(
57 57
         $wanted_code,
Please login to merge, or discard this patch.
main/inc/lib/TicketManager.php 4 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1862,9 +1862,9 @@  discard block
 block discarded – undo
1862 1862
         return 0;
1863 1863
     }
1864 1864
 
1865
-     /**
1866
-     * @return array
1867
-     */
1865
+        /**
1866
+         * @return array
1867
+         */
1868 1868
     public static function getPriorityList()
1869 1869
     {
1870 1870
         $projects = Database::getManager()->getRepository('ChamiloTicketBundle:Priority')->findAll();
@@ -2279,8 +2279,8 @@  discard block
 block discarded – undo
2279 2279
     }
2280 2280
 
2281 2281
         /**
2282
-     * @return array
2283
-     */
2282
+         * @return array
2283
+         */
2284 2284
     public static function getDefaultPriorityList()
2285 2285
     {
2286 2286
         return [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         }
169 169
 
170 170
         $table = Database::get_main_table(TABLE_TICKET_TICKET);
171
-        $sql = "UPDATE $table SET category_id = NULL WHERE category_id = $id";
171
+        $sql = "update $table SET category_id = NULL WHERE category_id = $id";
172 172
         Database::query($sql);
173 173
 
174 174
         $table = Database::get_main_table(TABLE_TICKET_CATEGORY);
@@ -417,13 +417,13 @@  discard block
 block discarded – undo
417 417
             }
418 418
 
419 419
             // Update code
420
-            $sql = "UPDATE $table_support_tickets
420
+            $sql = "update $table_support_tickets
421 421
                     SET code = '$ticket_code'
422 422
                     WHERE id = '$ticketId'";
423 423
             Database::query($sql);
424 424
 
425 425
             // Update total
426
-            $sql = "UPDATE $table_support_category
426
+            $sql = "update $table_support_category
427 427
                     SET total_tickets = total_tickets + 1
428 428
                     WHERE id = $category_id";
429 429
             Database::query($sql);
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
         $ticket = self::get_ticket_detail_by_id($ticketId);
590 590
 
591 591
         if ($ticket) {
592
-            $sql = "UPDATE $table_support_tickets
592
+            $sql = "update $table_support_tickets
593 593
                     SET assigned_last_user = $userId
594 594
                     WHERE id = $ticketId";
595 595
             Database::query($sql);
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
         $messageId = Database::insert($table_support_messages, $params);
660 660
         if ($messageId) {
661 661
             // update_total_message
662
-            $sql = "UPDATE $table_support_tickets
662
+            $sql = "update $table_support_tickets
663 663
                     SET 
664 664
                         sys_lastedit_user_id ='$userId',
665 665
                         sys_lastedit_datetime ='$now',
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
         );
1283 1283
         $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
1284 1284
         $now = api_get_utc_datetime();
1285
-        $sql = "UPDATE $table_support_messages
1285
+        $sql = "update $table_support_messages
1286 1286
                 SET
1287 1287
                     status = 'LEI',
1288 1288
                     sys_lastedit_user_id ='".api_get_user_id()."',
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
         $result = Database::query($sql);
1299 1299
         if (Database::affected_rows($result) > 0) {
1300 1300
             Database::query(
1301
-                "UPDATE $table_support_tickets SET
1301
+                "update $table_support_tickets SET
1302 1302
                     status_id = '".self::STATUS_PENDING."'
1303 1303
                  WHERE id ='$ticketId' AND status_id = '".self::STATUS_NEW."'"
1304 1304
             );
@@ -1420,7 +1420,7 @@  discard block
 block discarded – undo
1420 1420
         $userId = intval($userId);
1421 1421
 
1422 1422
         $now = api_get_utc_datetime();
1423
-        $sql = "UPDATE $table_support_tickets
1423
+        $sql = "update $table_support_tickets
1424 1424
                 SET
1425 1425
                     status_id = '$status_id',
1426 1426
                     sys_lastedit_user_id ='$userId',
@@ -1487,7 +1487,7 @@  discard block
 block discarded – undo
1487 1487
         $ticketId = intval($ticketId);
1488 1488
         $userId = intval($userId);
1489 1489
 
1490
-        $sql = "UPDATE $table_support_tickets SET
1490
+        $sql = "update $table_support_tickets SET
1491 1491
                   priority_id = '".self::PRIORITY_HIGH."',
1492 1492
                   sys_lastedit_user_id ='$userId',
1493 1493
                   sys_lastedit_datetime ='$now'
@@ -1506,7 +1506,7 @@  discard block
 block discarded – undo
1506 1506
 
1507 1507
         $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
1508 1508
         $now = api_get_utc_datetime();
1509
-        $sql = "UPDATE $table_support_tickets SET
1509
+        $sql = "update $table_support_tickets SET
1510 1510
                     status_id = '".self::STATUS_CLOSE."',
1511 1511
                     sys_lastedit_user_id ='$userId',
1512 1512
                     sys_lastedit_datetime ='".$now."',
@@ -1529,7 +1529,7 @@  discard block
 block discarded – undo
1529 1529
         $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
1530 1530
         $now = api_get_utc_datetime();
1531 1531
         $userId = api_get_user_id();
1532
-        $sql = "UPDATE $table_support_tickets
1532
+        $sql = "update $table_support_tickets
1533 1533
                 SET
1534 1534
                     status_id = '".self::STATUS_CLOSE."',
1535 1535
                     sys_lastedit_user_id ='$userId',
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -694,8 +694,8 @@  discard block
 block discarded – undo
694 694
     /**
695 695
      * Attachment files when a message is sent
696 696
      * @param $file_attach
697
-     * @param $ticketId
698
-     * @param $message_id
697
+     * @param integer $ticketId
698
+     * @param string $message_id
699 699
      * @return array
700 700
      */
701 701
     public static function save_message_attachment_file(
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
      * @param string $message
1316 1316
      * @param int $onlyToUserId
1317 1317
      *
1318
-     * @return bool
1318
+     * @return false|null
1319 1319
      */
1320 1320
     public static function sendNotification($ticketId, $title, $message, $onlyToUserId = 0)
1321 1321
     {
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
     }
1942 1942
 
1943 1943
     /**
1944
-     * @param $id
1944
+     * @param integer $id
1945 1945
      * @return Project
1946 1946
      */
1947 1947
     public static function getProject($id)
@@ -2063,7 +2063,7 @@  discard block
 block discarded – undo
2063 2063
     }
2064 2064
 
2065 2065
     /**
2066
-     * @param $id
2066
+     * @param integer $id
2067 2067
      * @return Project
2068 2068
      */
2069 2069
     public static function getStatus($id)
@@ -2188,7 +2188,7 @@  discard block
 block discarded – undo
2188 2188
     }
2189 2189
 
2190 2190
     /**
2191
-     * @param $id
2191
+     * @param integer $id
2192 2192
      * @return Priority
2193 2193
      */
2194 2194
     public static function getPriority($id)
@@ -2260,7 +2260,7 @@  discard block
 block discarded – undo
2260 2260
     }
2261 2261
 
2262 2262
     /**
2263
-     * @return array
2263
+     * @return string[]
2264 2264
      */
2265 2265
     public static function getDefaultStatusList()
2266 2266
     {
@@ -2274,7 +2274,7 @@  discard block
 block discarded – undo
2274 2274
     }
2275 2275
 
2276 2276
         /**
2277
-     * @return array
2277
+     * @return string[]
2278 2278
      */
2279 2279
     public static function getDefaultPriorityList()
2280 2280
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1085,7 +1085,7 @@
 block discarded – undo
1085 1085
         $res = Database::query($sql);
1086 1086
         $obj = Database::fetch_object($res);
1087 1087
 
1088
-        return (int)$obj->total;
1088
+        return (int) $obj->total;
1089 1089
     }
1090 1090
 
1091 1091
     /**
Please login to merge, or discard this patch.
plugin/sepe/src/sepe_plugin.class.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public $isAdminPlugin = true;
29 29
     /**
30 30
      *
31
-     * @return StaticPlugin
31
+     * @return SepePlugin
32 32
      */
33 33
     public static function create()
34 34
     {
Please login to merge, or discard this patch.
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * @author Jose Angel Ruiz    <[email protected]>
7 7
  * @author Julio Montoya <[email protected]>
8 8
  */
9
-class SepePlugin extends Plugin
10
-{
9
+class SepePlugin extends Plugin
10
+{
11 11
     const TABLE_SEPE_CENTER = 'plugin_sepe_center';
12 12
     const TABLE_SEPE_ACTIONS = 'plugin_sepe_actions';
13 13
     const TABLE_SEPE_SPECIALTY = 'plugin_sepe_specialty';
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return StaticPlugin
32 32
      */
33
-    public static function create()
34
-    {
33
+    public static function create()
34
+    {
35 35
         static $result = null;
36 36
         return $result ? $result : $result = new self();
37 37
     }
38 38
 
39
-    protected function __construct()
40
-    {
39
+    protected function __construct()
40
+    {
41 41
         parent::__construct(
42 42
             '2.0', 
43 43
             '
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * This method creates the tables required to this plugin
53 53
      */
54
-    function install()
55
-    {
54
+    function install()
55
+    {
56 56
         $tablesToBeCompared = array(
57 57
             self::TABLE_SEPE_CENTER,
58 58
             self::TABLE_SEPE_ACTIONS,
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $sm = $cn->getSchemaManager();
77 77
         $tables = $sm->tablesExist($tablesToBeCompared);
78 78
 
79
-        if ($tables) {
79
+        if ($tables) {
80 80
             return false;
81 81
         }
82 82
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * This method drops the plugin tables
88 88
      */
89
-    function uninstall()
90
-    {
89
+    function uninstall()
90
+    {
91 91
         $tablesToBeDeleted = array(
92 92
             self::TABLE_SEPE_CENTER,
93 93
             self::TABLE_SEPE_SPECIALTY_CLASSROOM,
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             self::TABLE_SEPE_LOG
108 108
         );
109 109
 
110
-        foreach ($tablesToBeDeleted as $tableToBeDeleted) {
110
+        foreach ($tablesToBeDeleted as $tableToBeDeleted) {
111 111
             $table = Database::get_main_table($tableToBeDeleted);
112 112
             $sql = "DROP TABLE IF EXISTS $table";
113 113
             Database::query($sql);
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
         $this->manageTab(false);
116 116
     }
117 117
 
118
-    function update()
119
-    {
118
+    function update()
119
+    {
120 120
         $oldTableCenters = 'plugin_sepe_centros';
121 121
         $oldTableTutorsCompany = 'plugin_sepe_tutors_empresa';
122 122
         $oldTableCompetence = 'plugin_sepe_competencia_docente';
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,9 +121,9 @@
 block discarded – undo
121 121
         $oldTableTutorsCompany = 'plugin_sepe_tutors_empresa';
122 122
         $oldTableCompetence = 'plugin_sepe_competencia_docente';
123 123
         $sql = "RENAME TABLE "
124
-                   . $oldTableCenters." TO ".self::TABLE_SEPE_CENTERS.", "
125
-                   . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", "
126
-                   . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";";
124
+                    . $oldTableCenters." TO ".self::TABLE_SEPE_CENTERS.", "
125
+                    . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", "
126
+                    . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";";
127 127
         Database::query($sql);
128 128
         
129 129
         $sepeCourseActionsTable = self::TABLE_SEPE_COURSE_ACTIONS;
Please login to merge, or discard this patch.
main/exercise/fill_blanks.class.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -783,29 +783,29 @@
 block discarded – undo
783 783
     }
784 784
 
785 785
     /**
786
-    * Return an array of student state answers for fill the blank questions
787
-    * for each students that answered the question
788
-    * -2  : didn't answer
789
-    * -1  : student answer is wrong
790
-    *  0  : student answer is correct
791
-    * >0  : for fill the blank question with choice menu, is the index of the student answer (right answer indice is 0)
792
-    *
793
-    * @param integer $testId
794
-    * @param integer $questionId
795
-    * @param $studentsIdList
796
-    * @param string $startDate
797
-    * @param string $endDate
798
-    * @param bool $useLastAnsweredAttempt
799
-    * @return array
800
-    * (
801
-    *     [student_id] => Array
802
-    *         (
803
-    *             [first fill the blank for question] => -1
804
-    *             [second fill the blank for question] => 2
805
-    *             [third fill the blank for question] => -1
806
-    *         )
807
-    * )
808
-    */
786
+     * Return an array of student state answers for fill the blank questions
787
+     * for each students that answered the question
788
+     * -2  : didn't answer
789
+     * -1  : student answer is wrong
790
+     *  0  : student answer is correct
791
+     * >0  : for fill the blank question with choice menu, is the index of the student answer (right answer indice is 0)
792
+     *
793
+     * @param integer $testId
794
+     * @param integer $questionId
795
+     * @param $studentsIdList
796
+     * @param string $startDate
797
+     * @param string $endDate
798
+     * @param bool $useLastAnsweredAttempt
799
+     * @return array
800
+     * (
801
+     *     [student_id] => Array
802
+     *         (
803
+     *             [first fill the blank for question] => -1
804
+     *             [second fill the blank for question] => 2
805
+     *             [third fill the blank for question] => -1
806
+     *         )
807
+     * )
808
+     */
809 809
     public static function getFillTheBlankTabResult(
810 810
         $testId,
811 811
         $questionId,
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -1230,6 +1230,7 @@  discard block
 block discarded – undo
1230 1230
      * @param string $answer
1231 1231
      * @param string $correct
1232 1232
      * @param bool   $resultsDisabled
1233
+     * @param integer $feedbackType
1233 1234
      *
1234 1235
      * @return string
1235 1236
      */
@@ -1243,6 +1244,7 @@  discard block
 block discarded – undo
1243 1244
      * @param string $answer
1244 1245
      * @param string $correct
1245 1246
      * @param bool   $resultsDisabled
1247
+     * @param integer $feedbackType
1246 1248
      *
1247 1249
      * @return string
1248 1250
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         // remove spaces at the beginning and the end of text in square brackets
372 372
         $answer = preg_replace_callback(
373 373
             "/".$blankStartSeparatorRegexp."[^]]+".$blankEndSeparatorRegexp."/",
374
-            function ($matches) use ($blankStartSeparator, $blankEndSeparator) {
374
+            function($matches) use ($blankStartSeparator, $blankEndSeparator) {
375 375
                 $matchingResult = $matches[0];
376 376
                 $matchingResult = trim($matchingResult, $blankStartSeparator);
377 377
                 $matchingResult = trim($matchingResult, $blankEndSeparator);
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
             // remove [ and ] in string
751 751
             array_walk(
752 752
                 $listWords[0],
753
-                function (&$value, $key, $tabBlankChar) {
753
+                function(&$value, $key, $tabBlankChar) {
754 754
                     $trimChars = '';
755 755
                     for ($i = 0; $i < count($tabBlankChar); $i++) {
756 756
                         $trimChars .= $tabBlankChar[$i];
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Filesystem/Data.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     /**
118 118
      * Create folders
119
-     * @param array $folderList
119
+     * @param string[] $folderList
120 120
      * @param OutputInterface $output
121 121
      * @param string $folderPermissions
122 122
      */
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      * http://chamilo/courses/ABC/document/file.jpg
201 201
      * @param string $content
202 202
      *
203
-     * @return string
203
+     * @return \simplehtmldom_1_5\simple_html_dom
204 204
      */
205 205
     public function convertRelativeToAbsoluteUrl($content)
206 206
     {
Please login to merge, or discard this patch.
plugin/buycourses/src/configuration.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
 $tpl->assign('sessions_are_included', $includeSession);
41 41
 $tpl->assign('services_are_included', $includeServices);
42 42
 
43
-if ($includeSession) {
43
+if ($includeSession) {
44 44
     $sessions = $plugin->getSessionsForConfiguration();
45 45
     $tpl->assign('sessions', $sessions);
46 46
 }
47 47
 
48
-if ($includeServices) {
48
+if ($includeServices) {
49 49
     $services = $plugin->getServices();
50 50
     $tpl->assign('services', $services);
51 51
 }
Please login to merge, or discard this patch.