Completed
Push — 1.10.x ( 9d3ef5...048bd3 )
by José
53:13
created
main/inc/lib/extra_field.lib.php 3 patches
Doc Comments   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     }
124 124
 
125 125
     /**
126
-     * @return array
126
+     * @return string[]
127 127
      */
128 128
     public static function getValidExtraFieldTypes()
129 129
     {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
     /**
201 201
      * @param array $conditions
202
-     * @param null  $order_field_options_by
202
+     * @param string  $order_field_options_by
203 203
      *
204 204
      * @return array
205 205
      */
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     /**
238 238
      * @param string $variable
239 239
      *
240
-     * @return array|bool
240
+     * @return integer
241 241
      */
242 242
     public function get_handler_field_info_by_field_variable($variable)
243 243
     {
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     /**
320 320
      * @param string $handler
321 321
      *
322
-     * @return array
322
+     * @return string[]
323 323
      */
324 324
     public static function get_extra_fields_by_handler($handler)
325 325
     {
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
     }
497 497
 
498 498
     /**
499
-     * @return array
499
+     * @return string[]
500 500
      */
501 501
     public function get_field_types()
502 502
     {
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     /**
507 507
      * @param int $id
508 508
      *
509
-     * @return null
509
+     * @return string|null
510 510
      */
511 511
     public function get_field_type_by_id($id)
512 512
     {
@@ -691,7 +691,6 @@  discard block
 block discarded – undo
691 691
      * @param FormValidator $form
692 692
      * @param array $extraData
693 693
      * @param bool $admin_permissions
694
-     * @param int $user_id
695 694
      * @param array $extra
696 695
      * @param int $itemId
697 696
      * @param array $exclude variables of extra field to exclude
@@ -1592,7 +1591,7 @@  discard block
 block discarded – undo
1592 1591
     }
1593 1592
 
1594 1593
     /**
1595
-     * @return array
1594
+     * @return string[]
1596 1595
      */
1597 1596
     public function getJqgridColumnNames()
1598 1597
     {
@@ -1832,7 +1831,7 @@  discard block
 block discarded – undo
1832 1831
     }
1833 1832
 
1834 1833
     /**
1835
-     * @param array $columns
1834
+     * @param string[] $columns
1836 1835
      * @param array  $column_model
1837 1836
      * @param array  $extraFields
1838 1837
      * @return array
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         'changeable',
20 20
         'filter',
21 21
         'extra_field_type',
22
-         /* Enable this when field_loggeable is introduced as a table field (2.0)
22
+            /* Enable this when field_loggeable is introduced as a table field (2.0)
23 23
         'field_loggeable',
24 24
          */
25 25
         'created_at'
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
      * France:Paris;Bretagne;Marseilles;Lyon|Belgique:Bruxelles;Namur;Liège;Bruges|Peru:Lima;Piura;
524 524
      * into
525 525
      * array(
526
- *      'France' =>
526
+     *      'France' =>
527 527
      *      array('Paris', 'Bregtane', 'Marseilles'),
528 528
      *  'Belgique' =>
529 529
      *      array('Namur', 'Liège')
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
 
1185 1185
                         if ($this->type == 'user') {
1186 1186
 
1187
-                           /* //the magic should be here
1187
+                            /* //the magic should be here
1188 1188
                             $user_tags = UserManager::get_user_tags($user_id, $field_details[0]);
1189 1189
 
1190 1190
                             $tag_list = '';
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
     );
27 27
 
28 28
     public $ops = array(
29
-        'eq' => '=',        //equal
30
-        'ne' => '<>',       //not equal
31
-        'lt' => '<',        //less than
32
-        'le' => '<=',       //less than or equal
33
-        'gt' => '>',        //greater than
34
-        'ge' => '>=',       //greater than or equal
35
-        'bw' => 'LIKE',     //begins with
29
+        'eq' => '=', //equal
30
+        'ne' => '<>', //not equal
31
+        'lt' => '<', //less than
32
+        'le' => '<=', //less than or equal
33
+        'gt' => '>', //greater than
34
+        'ge' => '>=', //greater than or equal
35
+        'bw' => 'LIKE', //begins with
36 36
         'bn' => 'NOT LIKE', //doesn't begin with
37
-        'in' => 'LIKE',     //is in
37
+        'in' => 'LIKE', //is in
38 38
         'ni' => 'NOT LIKE', //is not in
39
-        'ew' => 'LIKE',     //ends with
39
+        'ew' => 'LIKE', //ends with
40 40
         'en' => 'NOT LIKE', //doesn't end with
41
-        'cn' => 'LIKE',     //contains
41
+        'cn' => 'LIKE', //contains
42 42
         'nc' => 'NOT LIKE'  //doesn't contain
43 43
     );
44 44
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public static function get_extra_fields_by_handler($handler)
325 325
     {
326
-        $types= array();
326
+        $types = array();
327 327
         $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText');
328 328
         $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea');
329 329
         $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio');
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
                         // chzn-select doesn't work for sessions??
963 963
                         $form->addElement(
964 964
                             'select',
965
-                            'extra_' . $field_details['variable'],
965
+                            'extra_'.$field_details['variable'],
966 966
                             $field_details['display_text'],
967 967
                             $options,
968 968
                             array('id' => 'extra_'.$field_details['variable'])
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 
1022 1022
                         if (!$admin_permissions) {
1023 1023
                             if ($field_details['visible'] == 0) {
1024
-                                $form->freeze('extra_' . $field_details['variable']);
1024
+                                $form->freeze('extra_'.$field_details['variable']);
1025 1025
                             }
1026 1026
                         }
1027 1027
                         break;
@@ -1369,9 +1369,9 @@  discard block
 block discarded – undo
1369 1369
 
1370 1370
                         if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) {
1371 1371
 
1372
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1372
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1373 1373
                                 $fieldTexts[] = Display::img(
1374
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1374
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1375 1375
                                     $field_details['display_text'],
1376 1376
                                     array('width' => '300')
1377 1377
                                 );
@@ -1388,10 +1388,10 @@  discard block
 block discarded – undo
1388 1388
                         $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1389 1389
                         $form->applyFilter('extra_'.$field_details['variable'], 'trim');
1390 1390
 
1391
-                        $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
1391
+                        $allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif');
1392 1392
                         $form->addRule(
1393 1393
                             'extra_'.$field_details['variable'],
1394
-                            get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')',
1394
+                            get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
1395 1395
                             'filetype',
1396 1396
                             $allowed_picture_types
1397 1397
                         );
@@ -1433,10 +1433,10 @@  discard block
 block discarded – undo
1433 1433
                         if (is_array($extraData) &&
1434 1434
                             array_key_exists($fieldVariable, $extraData)
1435 1435
                         ) {
1436
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1436
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1437 1437
                                 $fieldTexts[] = Display::url(
1438
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1439
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1438
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1439
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1440 1440
                                     array(
1441 1441
                                         'title' => $field_details['display_text'],
1442 1442
                                         'target' => '_blank'
@@ -1486,12 +1486,12 @@  discard block
 block discarded – undo
1486 1486
                             "extra_{$field_details['variable']}",
1487 1487
                             $field_details['display_text']
1488 1488
                         );
1489
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1489
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1490 1490
 
1491 1491
                         if (!$admin_permissions) {
1492 1492
                             if ($field_details['visible'] == 0) {
1493 1493
                                 $form->freeze(
1494
-                                    'extra_' . $field_details['variable']
1494
+                                    'extra_'.$field_details['variable']
1495 1495
                                 );
1496 1496
                             }
1497 1497
                         }
@@ -1502,13 +1502,13 @@  discard block
 block discarded – undo
1502 1502
                             $field_details['display_text']
1503 1503
                         );
1504 1504
                         $form->applyFilter(
1505
-                            'extra_' . $field_details['variable'],
1505
+                            'extra_'.$field_details['variable'],
1506 1506
                             'stripslashes'
1507 1507
                         );
1508 1508
                         if (!$admin_permissions) {
1509 1509
                             if ($field_details['visible'] == 0) {
1510 1510
                                 $form->freeze(
1511
-                                    'extra_' . $field_details['variable']
1511
+                                    'extra_'.$field_details['variable']
1512 1512
                                 );
1513 1513
                             }
1514 1514
                         }
@@ -1518,12 +1518,12 @@  discard block
 block discarded – undo
1518 1518
                             "extra_{$field_details['variable']}",
1519 1519
                             $field_details['display_text']
1520 1520
                         );
1521
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1521
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1522 1522
 
1523 1523
                         if (!$admin_permissions) {
1524 1524
                             if ($field_details['visible'] == 0) {
1525 1525
                                 $form->freeze(
1526
-                                    'extra_' . $field_details['variable']
1526
+                                    'extra_'.$field_details['variable']
1527 1527
                                 );
1528 1528
                             }
1529 1529
                         }
@@ -1534,13 +1534,13 @@  discard block
 block discarded – undo
1534 1534
                             $field_details['display_text']
1535 1535
                         );
1536 1536
                         $form->applyFilter(
1537
-                            'extra_' . $field_details['variable'],
1537
+                            'extra_'.$field_details['variable'],
1538 1538
                             'stripslashes'
1539 1539
                         );
1540 1540
                         if (!$admin_permissions) {
1541 1541
                             if ($field_details['visible'] == 0) {
1542 1542
                                 $form->freeze(
1543
-                                    'extra_' . $field_details['variable']
1543
+                                    'extra_'.$field_details['variable']
1544 1544
                                 );
1545 1545
                             }
1546 1546
                         }
@@ -2221,19 +2221,19 @@  discard block
 block discarded – undo
2221 2221
                         break;
2222 2222
                     }
2223 2223
 
2224
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2224
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2225 2225
                         break;
2226 2226
                     }
2227 2227
 
2228 2228
                     $image = Display::img(
2229
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2229
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2230 2230
                         $field['display_text'],
2231 2231
                         array('width' => '300')
2232 2232
                     );
2233 2233
 
2234 2234
                     $displayedValue = Display::url(
2235 2235
                         $image,
2236
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2236
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2237 2237
                         array('target' => '_blank')
2238 2238
                     );
2239 2239
                     break;
@@ -2242,13 +2242,13 @@  discard block
 block discarded – undo
2242 2242
                         break;
2243 2243
                     }
2244 2244
 
2245
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2245
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2246 2246
                         break;
2247 2247
                     }
2248 2248
 
2249 2249
                     $displayedValue = Display::url(
2250 2250
                         get_lang('Download'),
2251
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2251
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2252 2252
                         array(
2253 2253
                             'title' => $field['display_text'],
2254 2254
                             'target' => '_blank'
Please login to merge, or discard this patch.
certificates/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     case 'export':
16 16
         $hideExportLink = api_get_setting('hide_certificate_export_link');
17 17
         $hideExportLinkStudent = api_get_setting('hide_certificate_export_link_students');
18
-        if ($hideExportLink === 'true' || (api_is_student() && $hideExportLinkStudent === 'true') ) {
18
+        if ($hideExportLink === 'true' || (api_is_student() && $hideExportLinkStudent === 'true')) {
19 19
             api_not_allowed(true);
20 20
         }
21 21
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $pageFormat = $pdfParams['orientation'] == 'landscape' ? 'A4-L' : 'A4';
37 37
 
38 38
             $userInfo = api_get_user_info($certificate->user_id);
39
-            $pdfName = api_replace_dangerous_char(get_lang('Certificate') . ' ' . $userInfo['username']);
39
+            $pdfName = api_replace_dangerous_char(get_lang('Certificate').' '.$userInfo['username']);
40 40
 
41 41
             $pdf = new PDF($pageFormat, $pdfParams['orientation'], $pdfParams);
42 42
             $pdf->html_to_pdf($certificatePathList, $pdfName, null, false, false);
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Entity/CLpCategory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  */
20 20
 class CLpCategory
21 21
 {
22
-  /**
22
+    /**
23 23
      * @var integer
24 24
      *
25 25
      * @ORM\Column(name="iid", type="integer")
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/TinyMce/TinyMce.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public function editorReplace()
49 49
     {
50
-        $toolbar  = new Toolbar\Basic($this->urlGenerator, $this->toolbarSet, $this->config, 'TinyMce');
50
+        $toolbar = new Toolbar\Basic($this->urlGenerator, $this->toolbarSet, $this->config, 'TinyMce');
51 51
         $toolbar->setLanguage($this->getLocale());
52 52
         $config = $toolbar->getConfig();
53 53
         $config['selector'] = "#".$this->name;
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/TinyMce/Toolbar/Basic.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
                 "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
23 23
                 "save table contextmenu directionality emoticons template paste textcolor"
24 24
             ),
25
-           'content_css'=> "css/content.css",
26
-           'toolbar' => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
25
+            'content_css'=> "css/content.css",
26
+            'toolbar' => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
27 27
             'file_browser_callback' => 'elFinderBrowser'
28 28
         );
29 29
 
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -633,8 +633,8 @@
 block discarded – undo
633 633
     }
634 634
 
635 635
     /**
636
-    * {@inheritdoc}
637
-    */
636
+     * {@inheritdoc}
637
+     */
638 638
     protected function _archive($dir, $files, $name, $arc) {
639 639
         return false;
640 640
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      * @return resource|false
465 465
      * @author Dmitry (dio) Levashov
466 466
      **/
467
-    protected function _fopen($path, $mode='rb') {
467
+    protected function _fopen($path, $mode = 'rb') {
468 468
         $fp = $this->tmbPath
469 469
             ? @fopen($this->tmpname($path), 'w+')
470 470
             : @tmpfile();
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      * @return bool
492 492
      * @author Dmitry (dio) Levashov
493 493
      **/
494
-    protected function _fclose($fp, $path='') {
494
+    protected function _fclose($fp, $path = '') {
495 495
         @fclose($fp);
496 496
         if ($path) {
497 497
             @unlink($this->tmpname($path));
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/HomeDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 'driver' => 'HomeDriver',
32 32
                 'alias' => get_lang('Portal'),
33 33
                 'path' => $home,
34
-                'URL' => api_get_path(WEB_PATH) . 'home',
34
+                'URL' => api_get_path(WEB_PATH).'home',
35 35
                 'accessControl' => array($this, 'access'),
36 36
             );
37 37
         }
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
                 mkdir($dir);
26 26
             }
27 27
 
28
-            if (!is_dir($dir . 'my_files')) {
29
-                mkdir($dir . 'my_files');
28
+            if (!is_dir($dir.'my_files')) {
29
+                mkdir($dir.'my_files');
30 30
             }
31 31
         }
32 32
     }
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
         if (!empty($courseInfo)) {
28 28
 
29 29
             $coursePath = api_get_path(SYS_COURSE_PATH);
30
-            $courseDir = $courseInfo['directory'] . '/document';
31
-            $baseDir = $coursePath . $courseDir;
30
+            $courseDir = $courseInfo['directory'].'/document';
31
+            $baseDir = $coursePath.$courseDir;
32 32
 
33 33
             // Creates shared folder
34 34
 
35
-            if (!file_exists($baseDir . '/shared_folder')) {
35
+            if (!file_exists($baseDir.'/shared_folder')) {
36 36
                 $title = get_lang('UserFolders');
37 37
                 $folderName = '/shared_folder';
38 38
                 //$groupId = 0;
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
             }
52 52
 
53 53
             // Creates user-course folder
54
-            if (!file_exists($baseDir . '/shared_folder/sf_user_' . $userId)) {
54
+            if (!file_exists($baseDir.'/shared_folder/sf_user_'.$userId)) {
55 55
                 $title = $userInfo['complete_name'];
56
-                $folderName = '/shared_folder/sf_user_' . $userId;
56
+                $folderName = '/shared_folder/sf_user_'.$userId;
57 57
                 $visibility = 1;
58 58
                 create_unexisting_directory(
59 59
                     $courseInfo,
Please login to merge, or discard this patch.