Completed
Push — 1.10.x ( 88a87a...1d0427 )
by Julito
47:51
created
main/inc/lib/display.lib.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param string Optional help file name
56 56
      * @param string $page_header
57 57
      */
58
-    public static function display_header($tool_name ='', $help = null, $page_header = null)
58
+    public static function display_header($tool_name = '', $help = null, $page_header = null)
59 59
     {
60 60
         $origin = api_get_origin();
61 61
         $showHeader = true;
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $grid_class = array(),
352 352
         $elementCount = 0
353 353
     ) {
354
-        $column =  0;
354
+        $column = 0;
355 355
         $default_items_per_page = isset($paging_options['per_page']) ? $paging_options['per_page'] : 20;
356 356
 
357 357
         $table = new SortableTableFromArray($content, $column, $default_items_per_page, $name);
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      * @param bool	Filter (true) or not (false)
477 477
      * @return void
478 478
      */
479
-    public static function display_confirmation_message ($message, $filter = true, $returnValue = false)
479
+    public static function display_confirmation_message($message, $filter = true, $returnValue = false)
480 480
     {
481 481
         $message = self::return_message($message, 'confirm', $filter);
482 482
         if ($returnValue) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      * @param bool	Filter (true) or not (false)
494 494
      * @return void
495 495
      */
496
-    public static function display_error_message ($message, $filter = true, $returnValue = false)
496
+    public static function display_error_message($message, $filter = true, $returnValue = false)
497 497
     {
498 498
         $message = self::return_message($message, 'error', $filter);
499 499
         if ($returnValue) {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
      * @param string $type
509 509
      * @param bool $filter
510 510
      */
511
-    public static function return_message_and_translate($message, $type='normal', $filter = true)
511
+    public static function return_message_and_translate($message, $type = 'normal', $filter = true)
512 512
     {
513 513
         $message = get_lang($message);
514 514
         echo self::return_message($message, $type, $filter);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
         }
533 533
 
534 534
         $class = "";
535
-        switch($type) {
535
+        switch ($type) {
536 536
             case 'warning':
537 537
                $class .= 'alert alert-warning';
538 538
                break;
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      * @param string  optional, class from stylesheet
561 561
      * @return string encrypted mailto hyperlink
562 562
      */
563
-    public static function encrypted_mailto_link ($email, $clickable_text = null, $style_class = '')
563
+    public static function encrypted_mailto_link($email, $clickable_text = null, $style_class = '')
564 564
     {
565 565
         if (is_null($clickable_text)) {
566 566
             $clickable_text = $email;
@@ -575,14 +575,14 @@  discard block
 block discarded – undo
575 575
         }
576 576
         // Encrypt email
577 577
         $hmail = '';
578
-        for ($i = 0; $i < strlen($email); $i ++) {
578
+        for ($i = 0; $i < strlen($email); $i++) {
579 579
             $hmail .= '&#'.ord($email {
580 580
             $i }).';';
581 581
         }
582 582
         $hclickable_text = null;
583 583
         // Encrypt clickable text if @ is present
584 584
         if (strpos($clickable_text, '@')) {
585
-            for ($i = 0; $i < strlen($clickable_text); $i ++) {
585
+            for ($i = 0; $i < strlen($clickable_text); $i++) {
586 586
                 $hclickable_text .= '&#'.ord($clickable_text {
587 587
                 $i }).';';
588 588
             }
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         }
615 615
         // Encrypt email
616 616
         $hmail = '';
617
-        for ($i = 0; $i < strlen($email); $i ++) {
617
+        for ($i = 0; $i < strlen($email); $i++) {
618 618
             $hmail .= '&#'.ord($email {
619 619
             $i }).';';
620 620
         }
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
     public static function get_alphabet_options($selected_letter = '')
648 648
     {
649 649
         $result = '';
650
-        for ($i = 65; $i <= 90; $i ++) {
650
+        for ($i = 65; $i <= 90; $i++) {
651 651
             $letter = chr($i);
652 652
             $result .= '<option value="'.$letter.'"';
653 653
             if ($selected_letter == $letter) {
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
     public static function get_numeric_options($min, $max, $selected_num = 0)
669 669
     {
670 670
         $result = '';
671
-        for ($i = $min; $i <= $max; $i ++) {
671
+        for ($i = $min; $i <= $max; $i++) {
672 672
             $result .= '<option value="'.$i.'"';
673 673
             if (is_int($selected_num))
674 674
                 if ($selected_num == $i) {
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
             $size = ICON_SIZE_SMALL;
746 746
         }
747 747
 
748
-        $size_extra = $size . '/';
748
+        $size_extra = $size.'/';
749 749
 
750 750
         // Checking the img/ folder
751 751
         $icon = $w_code_path.'img/'.$image;
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
         $theme = 'themes/chamilo/icons/';
754 754
 
755 755
         if ($loadThemeIcon) {
756
-            $theme = 'themes/' . api_get_visual_theme() . '/icons/';
756
+            $theme = 'themes/'.api_get_visual_theme().'/icons/';
757 757
             // Checking the theme icons folder example: app/Resources/public/css/themes/chamilo/icons/XXX
758 758
             if (is_file($alternateCssPath.$theme.$size_extra.$image)) {
759 759
                 $icon = $alternateWebCssPath.$theme.$size_extra.$image;
@@ -775,11 +775,11 @@  discard block
 block discarded – undo
775 775
         // ask for the SVG version directly
776 776
         $testServer = api_get_setting('server_type');
777 777
         if ($testServer == 'test' && $return_only_path == false) {
778
-            $svgImage = substr($image, 0, -3) . 'svg';
779
-            if (is_file($code_path . $theme . 'svg/' . $svgImage)) {
780
-                $icon = $w_code_path . $theme . 'svg/' . $svgImage;
781
-            } elseif (is_file($code_path . 'img/icons/svg/' . $svgImage)) {
782
-                $icon = $w_code_path . 'img/icons/svg/' . $svgImage;
778
+            $svgImage = substr($image, 0, -3).'svg';
779
+            if (is_file($code_path.$theme.'svg/'.$svgImage)) {
780
+                $icon = $w_code_path.$theme.'svg/'.$svgImage;
781
+            } elseif (is_file($code_path.'img/icons/svg/'.$svgImage)) {
782
+                $icon = $w_code_path.'img/icons/svg/'.$svgImage;
783 783
             }
784 784
 
785 785
             if (empty($additional_attributes['height'])) {
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
             }
860 860
         }
861 861
         //some tags don't have this </XXX>
862
-        if (in_array($tag, array('img','input','br'))) {
862
+        if (in_array($tag, array('img', 'input', 'br'))) {
863 863
             $return_value = '<'.$tag.' '.$attribute_list.' />';
864 864
         } else {
865 865
             $return_value = '<'.$tag.' '.$attribute_list.' > '.$content.'</'.$tag.'>';
@@ -912,13 +912,13 @@  discard block
 block discarded – undo
912 912
     public static function input($type, $name, $value, $attributes = array())
913 913
     {
914 914
          if (isset($type)) {
915
-             $attributes['type']= $type;
915
+             $attributes['type'] = $type;
916 916
          }
917 917
          if (isset($name)) {
918
-             $attributes['name']= $name;
918
+             $attributes['name'] = $name;
919 919
          }
920 920
          if (isset($value)) {
921
-             $attributes['value']= $value;
921
+             $attributes['value'] = $value;
922 922
         }
923 923
         return self::tag('input', '', $attributes);
924 924
     }
@@ -951,14 +951,14 @@  discard block
 block discarded – undo
951 951
     ) {
952 952
         $html = '';
953 953
         $extra = '';
954
-        $default_id = 'id="' . $name . '" ';
954
+        $default_id = 'id="'.$name.'" ';
955 955
         foreach ($extra_attributes as $key => $parameter) {
956 956
             if ($key == 'id') {
957 957
                 $default_id = '';
958 958
             }
959
-            $extra .= $key . '="' . $parameter . '" ';
959
+            $extra .= $key.'="'.$parameter.'" ';
960 960
         }
961
-        $html .= '<select name="' . $name . '" ' . $default_id . ' ' . $extra . '>';
961
+        $html .= '<select name="'.$name.'" '.$default_id.' '.$extra.'>';
962 962
 
963 963
         if ($show_blank_item) {
964 964
             if (empty($blank_item_text)) {
@@ -966,14 +966,14 @@  discard block
 block discarded – undo
966 966
             } else {
967 967
                 $blank_item_text = Security::remove_XSS($blank_item_text);
968 968
             }
969
-            $html .= self::tag('option', '-- ' . $blank_item_text . ' --', array('value' => '-1'));
969
+            $html .= self::tag('option', '-- '.$blank_item_text.' --', array('value' => '-1'));
970 970
         }
971 971
         if ($values) {
972 972
             foreach ($values as $key => $value) {
973 973
                 if (is_array($value) && isset($value['name'])) {
974 974
                     $value = $value['name'];
975 975
                 }
976
-                $html .= '<option value="' . $key . '"';
976
+                $html .= '<option value="'.$key.'"';
977 977
 
978 978
                 if (is_array($default)) {
979 979
                     foreach ($default as $item) {
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
                     }
989 989
                 }
990 990
 
991
-                $html .= '>' . $value . '</option>';
991
+                $html .= '>'.$value.'</option>';
992 992
             }
993 993
         }
994 994
         $html .= '</select>';
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
      */
1015 1015
     public static function tabs($header_list, $content_list, $id = 'tabs', $attributes = array(), $ul_attributes = array())
1016 1016
     {
1017
-        if (empty($header_list) || count($header_list) == 0 ) {
1017
+        if (empty($header_list) || count($header_list) == 0) {
1018 1018
             return '';
1019 1019
         }
1020 1020
 
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 
1052 1052
         $main_div = self::tag('div', $ul.self::tag('div', $divs, ['class' => 'tab-content']), $attributes);
1053 1053
 
1054
-        return $main_div ;
1054
+        return $main_div;
1055 1055
     }
1056 1056
 
1057 1057
     /**
@@ -1099,8 +1099,8 @@  discard block
 block discarded – undo
1099 1099
      */
1100 1100
     public static function grid_html($div_id)
1101 1101
     {
1102
-        $table  = self::tag('table','', array('id' => $div_id));
1103
-        $table .= self::tag('div','', array('id' => $div_id.'_pager'));
1102
+        $table  = self::tag('table', '', array('id' => $div_id));
1103
+        $table .= self::tag('div', '', array('id' => $div_id.'_pager'));
1104 1104
         return $table;
1105 1105
     }
1106 1106
 
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
         $obj->colNames      = $column_names;
1162 1162
         $obj->colModel      = $column_model;
1163 1163
         $obj->pager         = '#'.$div_id.'_pager';
1164
-        $obj->datatype  = 'json';
1164
+        $obj->datatype = 'json';
1165 1165
         $obj->viewrecords = 'true';
1166 1166
 
1167 1167
         $all_value = 10000000;
@@ -1222,10 +1222,10 @@  discard block
 block discarded – undo
1222 1222
         // Adding static data.
1223 1223
         if (!empty($data)) {
1224 1224
             $data_var = $div_id.'_data';
1225
-            $json.=' var '.$data_var.' = '.json_encode($data).';';
1225
+            $json .= ' var '.$data_var.' = '.json_encode($data).';';
1226 1226
             $obj->data = $data_var;
1227 1227
             $obj->datatype = 'local';
1228
-            $json.="\n";
1228
+            $json .= "\n";
1229 1229
         }
1230 1230
 
1231 1231
         $obj->end = 'end';
@@ -1239,12 +1239,12 @@  discard block
 block discarded – undo
1239 1239
         }
1240 1240
 
1241 1241
         // Fixing true/false js values that doesn't need the ""
1242
-        $json_encode = str_replace(':"true"',':true',$json_encode);
1242
+        $json_encode = str_replace(':"true"', ':true', $json_encode);
1243 1243
         // wrap_cell is not a valid jqgrid attributes is a hack to wrap a text
1244 1244
         $json_encode = str_replace('"wrap_cell":true', 'cellattr : function(rowId, value, rowObject, colModel, arrData) { return \'class = "jqgrid_whitespace"\'; }', $json_encode);
1245
-        $json_encode = str_replace(':"false"',':false',$json_encode);
1245
+        $json_encode = str_replace(':"false"', ':false', $json_encode);
1246 1246
         $json_encode = str_replace('"formatter":"action_formatter"', 'formatter:action_formatter', $json_encode);
1247
-        $json_encode = str_replace(array('{"first":"first",','"end":"end"}'), '', $json_encode);
1247
+        $json_encode = str_replace(array('{"first":"first",', '"end":"end"}'), '', $json_encode);
1248 1248
 
1249 1249
         // Creating the jqgrid element.
1250 1250
         $json .= '$("#'.$div_id.'").jqGrid({';
@@ -1259,22 +1259,22 @@  discard block
 block discarded – undo
1259 1259
             $groups = '';
1260 1260
             foreach ($extra_params['groupHeaders'] as $group) {
1261 1261
                 //{ "startColumnName" : "courses", "numberOfColumns" : 1, "titleText" : "Order Info" },
1262
-                $groups .= '{ "startColumnName" : "' . $group['startColumnName'] . '", "numberOfColumns" : ' . $group['numberOfColumns'] . ', "titleText" : "' . $group['titleText']  . '" },';
1262
+                $groups .= '{ "startColumnName" : "'.$group['startColumnName'].'", "numberOfColumns" : '.$group['numberOfColumns'].', "titleText" : "'.$group['titleText'].'" },';
1263 1263
 
1264 1264
             }
1265 1265
             $json .= '$("#'.$div_id.'").jqGrid("setGroupHeaders", {
1266 1266
                 "useColSpanStyle" : false,
1267 1267
                 "groupHeaders"    : [
1268
-                    ' . $groups . '
1268
+                    ' . $groups.'
1269 1269
                 ]
1270 1270
             });';
1271 1271
         }
1272 1272
 
1273 1273
         $all_text = addslashes(get_lang('All'));
1274 1274
         $json .= '$("'.$obj->pager.' option[value='.$all_value.']").text("'.$all_text.'");';
1275
-        $json.= "\n";
1275
+        $json .= "\n";
1276 1276
         // Adding edit/delete icons.
1277
-        $json.= $formatter;
1277
+        $json .= $formatter;
1278 1278
 
1279 1279
         return $json;
1280 1280
     }
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
         }
1306 1306
 
1307 1307
         if (!empty($rows)) {
1308
-	        foreach($rows as $content) {
1308
+	        foreach ($rows as $content) {
1309 1309
 	            $table->setCellContents($row, $column, $content);
1310 1310
                 $row++;
1311 1311
             }
@@ -1467,7 +1467,7 @@  discard block
 block discarded – undo
1467 1467
 
1468 1468
         // Show all tool icons where there is something new.
1469 1469
         $return = '&nbsp;';
1470
-        foreach($notifications as $notification) {
1470
+        foreach ($notifications as $notification) {
1471 1471
             $lastDate = date('d/m/Y H:i', convert_sql_date($notification['lastedit_date']));
1472 1472
             $type = $notification['lastedit_type'];
1473 1473
             $label = get_lang('TitleNotification').": ".get_lang($type)." ($lastDate)";
@@ -1510,9 +1510,9 @@  discard block
 block discarded – undo
1510 1510
             $tbl_session            = Database :: get_main_table(TABLE_MAIN_SESSION);
1511 1511
             $active = false;
1512 1512
             // Request for the name of the general coach
1513
-            $sql ='SELECT tu.lastname, tu.firstname, ts.*
1513
+            $sql = 'SELECT tu.lastname, tu.firstname, ts.*
1514 1514
                     FROM '.$tbl_session.' ts
1515
-                    LEFT JOIN '.$main_user_table .' tu
1515
+                    LEFT JOIN '.$main_user_table.' tu
1516 1516
                     ON ts.id_coach = tu.user_id
1517 1517
                     WHERE ts.id = '.intval($session_id);
1518 1518
             $rs = Database::query($sql);
@@ -1522,7 +1522,7 @@  discard block
 block discarded – undo
1522 1522
             $session = array();
1523 1523
             $session['title'] = $session_info['name'];
1524 1524
             $session['coach'] = '';
1525
-            $session['dates'] =  '';
1525
+            $session['dates'] = '';
1526 1526
 
1527 1527
             if (
1528 1528
                 (
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
                 }
1606 1606
 
1607 1607
                 if (api_get_setting('show_session_coach') === 'true') {
1608
-                    $session['coach'] = get_lang('GeneralCoach') . ': ' . api_get_person_name(
1608
+                    $session['coach'] = get_lang('GeneralCoach').': '.api_get_person_name(
1609 1609
                         $session_info['firstname'],
1610 1610
                         $session_info['lastname']
1611 1611
                     );
@@ -1656,9 +1656,9 @@  discard block
 block discarded – undo
1656 1656
 		$percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0;
1657 1657
 
1658 1658
 		if (!empty($percentage)) {
1659
-            $percentage = $percentage*125/100;
1659
+            $percentage = $percentage * 125 / 100;
1660 1660
         }
1661
-		$accesses =  isset($point_info['accesses']) ? $point_info['accesses'] : 0;
1661
+		$accesses = isset($point_info['accesses']) ? $point_info['accesses'] : 0;
1662 1662
 
1663 1663
 		$star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']);
1664 1664
 
@@ -1673,19 +1673,19 @@  discard block
 block discarded – undo
1673 1673
 
1674 1674
 		$labels = array();
1675 1675
 
1676
-		$labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes');
1677
-		$labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits');
1676
+		$labels[] = $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes');
1677
+		$labels[] = $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits');
1678 1678
 		if (!empty($number_of_users_who_voted)) {
1679
-			$labels[]= get_lang('Average').' '.$point_info['point_average_star'].'/5';
1679
+			$labels[] = get_lang('Average').' '.$point_info['point_average_star'].'/5';
1680 1680
 		}
1681 1681
 
1682
-		$labels[]= $point_info['user_vote']  ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote'). ' [?] ';
1682
+		$labels[] = $point_info['user_vote'] ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote').' [?] ';
1683 1683
 
1684 1684
 		if (!$add_div_wrapper && api_is_anonymous()) {
1685
-			$labels[]= Display::tag('span', get_lang('LoginToVote'), array('class' => 'error'));
1685
+			$labels[] = Display::tag('span', get_lang('LoginToVote'), array('class' => 'error'));
1686 1686
 		}
1687 1687
 
1688
-        $html .= Display::div(implode(' | ', $labels) , array('id' =>  'vote_label_'.$id, 'class' => 'vote_label_info'));
1688
+        $html .= Display::div(implode(' | ', $labels), array('id' =>  'vote_label_'.$id, 'class' => 'vote_label_info'));
1689 1689
         $html .= ' '.Display::span(' ', array('id' =>  'vote_label2_'.$id));
1690 1690
 
1691 1691
         if ($add_div_wrapper) {
@@ -1763,8 +1763,8 @@  discard block
 block discarded – undo
1763 1763
         if (!empty($list)) {
1764 1764
             $html = '<dl class="dl-horizontal">';
1765 1765
             foreach ($list as $item) {
1766
-                $html .= '<dt>' . $item['title'] . '</dt>';
1767
-                $html .= '<dd>' . $item['content'] . '</dd>';
1766
+                $html .= '<dt>'.$item['title'].'</dt>';
1767
+                $html .= '<dd>'.$item['content'].'</dd>';
1768 1768
             }
1769 1769
             $html .= '</dl>';
1770 1770
         }
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
      * @param string $type
1807 1807
      * @return null|string
1808 1808
      */
1809
-    public static function badge($count, $type ="warning")
1809
+    public static function badge($count, $type = "warning")
1810 1810
     {
1811 1811
         $class = '';
1812 1812
 
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
         if (!empty($content)) {
1883 1883
             $html = '<span class="label '.$class.'">';
1884 1884
             $html .= $content;
1885
-            $html .='</span>';
1885
+            $html .= '</span>';
1886 1886
         }
1887 1887
 
1888 1888
         return $html;
@@ -1903,7 +1903,7 @@  discard block
 block discarded – undo
1903 1903
                     $class = 'class ="active"';
1904 1904
                 }
1905 1905
 
1906
-                if (basename($_SERVER['REQUEST_URI']) == basename($value['url']) ) {
1906
+                if (basename($_SERVER['REQUEST_URI']) == basename($value['url'])) {
1907 1907
                     $class = 'class ="active"';
1908 1908
                 }
1909 1909
                 $html .= "<li $class >";
@@ -2154,7 +2154,7 @@  discard block
 block discarded – undo
2154 2154
         }
2155 2155
         $label = $nextValue + $localCounter + 1;
2156 2156
         if ($isMedia) {
2157
-            $label = ($fixedValue + 1) .' '.chr(97 + $localCounter);
2157
+            $label = ($fixedValue + 1).' '.chr(97 + $localCounter);
2158 2158
             $link_to_show = $link.$fixedValue.'#questionanchor'.$itemId;
2159 2159
         }
2160 2160
         $link = Display::url($label.' ', $link_to_show, $linkAttributes);
@@ -2266,7 +2266,7 @@  discard block
 block discarded – undo
2266 2266
      */
2267 2267
     public static function getVCardUserLink($userId)
2268 2268
     {
2269
-        $vCardUrl = api_get_path(WEB_PATH).'main/social/vcard_export.php?userId='.intval($userId);;
2269
+        $vCardUrl = api_get_path(WEB_PATH).'main/social/vcard_export.php?userId='.intval($userId); ;
2270 2270
 
2271 2271
         return $vCardUrl;
2272 2272
     }
@@ -2284,7 +2284,7 @@  discard block
 block discarded – undo
2284 2284
     {
2285 2285
         $title = !empty($title) ? '<div class="panel-heading"><h3 class="panel-title">'.$title.'</h3>'.$extra.'</div>' : '';
2286 2286
         $footer = !empty($footer) ? '<div class="panel-footer ">'.$footer.'</div>' : '';
2287
-        $styles = ['primary','success','info','warning','danger'];
2287
+        $styles = ['primary', 'success', 'info', 'warning', 'danger'];
2288 2288
         $style = !in_array($style, $styles) ? 'default' : $style;
2289 2289
 
2290 2290
         return '
@@ -2329,7 +2329,7 @@  discard block
 block discarded – undo
2329 2329
         $attributes['class'] = isset($attributes['class']) ? "$buttonClass {$attributes['class']}" : $buttonClass;
2330 2330
 
2331 2331
         if (!$includeText) {
2332
-            $text = '<span class="sr-only">' . $text . '</span>';
2332
+            $text = '<span class="sr-only">'.$text.'</span>';
2333 2333
         }
2334 2334
 
2335 2335
         return self::url("$icon $text", $url, $attributes);
@@ -2344,16 +2344,16 @@  discard block
 block discarded – undo
2344 2344
      */
2345 2345
     public static function toolbarAction($id, $content = array(), $col = 2, $right = true)
2346 2346
     {
2347
-        $columns = 12/$col;
2347
+        $columns = 12 / $col;
2348 2348
         $html = '';
2349
-        $html .= '<div id="' . $id . '" class="actions">';
2349
+        $html .= '<div id="'.$id.'" class="actions">';
2350 2350
         $html .= '<div class="row">';
2351 2351
         if ($col > 4) {
2352 2352
             $html = '<div class="alert alert-warning" role="alert">Action toolbar design does not work when exceeding four columns - check Display::toolbarAction()</div>';
2353 2353
         } else {
2354
-            for ( $i = 0; $i < $col; $i++ ) {
2355
-                $html .= '<div class="col-md-' . $columns . '">';
2356
-                if ( $col == 2 && $i == 1 ) {
2354
+            for ($i = 0; $i < $col; $i++) {
2355
+                $html .= '<div class="col-md-'.$columns.'">';
2356
+                if ($col == 2 && $i == 1) {
2357 2357
                     if ($right === true) {
2358 2358
                         $html .= '<div class="pull-right">';
2359 2359
                         $html .= (isset($content[$i]) ? $content[$i] : '');
@@ -2468,9 +2468,9 @@  discard block
 block discarded – undo
2468 2468
             $params['class'] = 'panel panel-default';
2469 2469
             $html = null;
2470 2470
             if (!empty($title)) {
2471
-                $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL;
2471
+                $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL;
2472 2472
             }
2473
-            $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL;
2473
+            $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL;
2474 2474
             $html = Display::div($html, $params);
2475 2475
         }
2476 2476
         return $html;
Please login to merge, or discard this patch.