Passed
Push — scrutinizer-code-quality ( eedb15...27193c )
by Adam
54:15 queued 15s
created
include/Smarty/plugins/function.sugar_translate.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -62,19 +62,19 @@
 block discarded – undo
62 62
  */
63 63
 function smarty_function_sugar_translate($params, &$smarty)
64 64
 {
65
-	if (!isset($params['label'])){
66
-		$smarty->trigger_error("sugar_translate: missing 'label' parameter");
67
-		return '';
68
-	}
65
+    if (!isset($params['label'])){
66
+        $smarty->trigger_error("sugar_translate: missing 'label' parameter");
67
+        return '';
68
+    }
69 69
 
70
-	$module = (isset($params['module']))? $params['module']: '';
70
+    $module = (isset($params['module']))? $params['module']: '';
71 71
     if(isset($params['select'])){
72
-    	if(empty($params['select']))
73
-		    $value = "";
74
-		else
75
-		    $value = translate($params['label'] , $module, $params['select']);
76
-	}else{
77
-		$value = translate($params['label'] , $module);
72
+        if(empty($params['select']))
73
+            $value = "";
74
+        else
75
+            $value = translate($params['label'] , $module, $params['select']);
76
+    }else{
77
+        $value = translate($params['label'] , $module);
78 78
     }
79 79
     if (!empty($params['for_js']) && $params['for_js']) {
80 80
         $value = addslashes($value);
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_evalcolumn.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -88,24 +88,24 @@  discard block
 block discarded – undo
88 88
     if (!empty($params['var']['assign'])) {
89 89
         return '{$' . $params['colData']['field']['name'] . '}';
90 90
     } else {
91
-    	$code = $params['var']['customCode'];
92
-    	if(isset($params['tabindex']) && preg_match_all("'(<[ ]*?)(textarea|input|select)([^>]*?)(>)'si", $code, $matches, PREG_PATTERN_ORDER)) {
93
-    	   $str_replace = array();
94
-    	   $tabindex = ' tabindex="' . $params['tabindex'] . '" ';
95
-    	   foreach($matches[3] as $match) {
96
-    	   	       $str_replace[$match] = $tabindex . $match;
97
-    	   }
98
-    	   $code = str_replace(array_keys($str_replace), array_values($str_replace), $code);
99
-    	}
91
+        $code = $params['var']['customCode'];
92
+        if(isset($params['tabindex']) && preg_match_all("'(<[ ]*?)(textarea|input|select)([^>]*?)(>)'si", $code, $matches, PREG_PATTERN_ORDER)) {
93
+            $str_replace = array();
94
+            $tabindex = ' tabindex="' . $params['tabindex'] . '" ';
95
+            foreach($matches[3] as $match) {
96
+                        $str_replace[$match] = $tabindex . $match;
97
+            }
98
+            $code = str_replace(array_keys($str_replace), array_values($str_replace), $code);
99
+        }
100 100
 
101 101
         if(isset($params['accesskey']) && preg_match_all("'(<[ ]*?)(textarea|input|select)([^>]*?)(>)'si", $code, $matches, PREG_PATTERN_ORDER)) {
102
-    	   $str_replace = array();
103
-    	   $accesskey = ' accesskey="' . $params['accesskey'] . '" ';
104
-    	   foreach($matches[3] as $match) {
105
-    	   	       $str_replace[$match] = $accesskey . $match;
106
-    	   }
107
-    	   $code = str_replace(array_keys($str_replace), array_values($str_replace), $code);
108
-    	}
102
+            $str_replace = array();
103
+            $accesskey = ' accesskey="' . $params['accesskey'] . '" ';
104
+            foreach($matches[3] as $match) {
105
+                        $str_replace[$match] = $accesskey . $match;
106
+            }
107
+            $code = str_replace(array_keys($str_replace), array_values($str_replace), $code);
108
+        }
109 109
     	
110 110
         // Add a string replace to swap out @@FIELD@@ for the actual field,
111 111
         // we can't do this through customCode directly because the sugar_field smarty function returns smarty code to run on the second pass
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
             $code = str_replace('@@FIELD@@',$fieldText,$code);
127 127
         }
128 128
 
129
-    	//eggsurplus bug 28321: add support for rendering customCode AND normal field rendering
130
-    	if(!empty($params['var']['displayParams']['enableConnectors']) && empty($params['var']['customCodeRenderField'])) {
131
-    	  require_once('include/connectors/utils/ConnectorUtils.php');
132
-    	  $code .= '&nbsp;' . ConnectorUtils::getConnectorButtonScript($params['var']['displayParams'], $smarty);
133
-    	}
134
-    	return $code;
129
+        //eggsurplus bug 28321: add support for rendering customCode AND normal field rendering
130
+        if(!empty($params['var']['displayParams']['enableConnectors']) && empty($params['var']['customCodeRenderField'])) {
131
+            require_once('include/connectors/utils/ConnectorUtils.php');
132
+            $code .= '&nbsp;' . ConnectorUtils::getConnectorButtonScript($params['var']['displayParams'], $smarty);
133
+        }
134
+        return $code;
135 135
     }
136 136
     
137 137
     
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_action_menu.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
                 ));
158 158
             } else if(strlen($item)) {
159 159
                 array_push($menus['items'],array(
160
-                   'html' => $item
160
+                    'html' => $item
161 161
                 ));
162 162
             }
163 163
         }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.ext_includes.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,19 +43,19 @@
 block discarded – undo
43 43
 
44 44
 function smarty_function_ext_includes($params, &$smarty)
45 45
 {
46
-	$ret = '<link rel="stylesheet" type="text/css" href="' . getJSPath("themes/default/ext/resources/css/ext-all.css") . '" />'
47
-		 . '<link rel="stylesheet" type="text/css" href="' . getJSPath("themes/default/ext/resources/css/xtheme-gray.css") . '" />';
46
+    $ret = '<link rel="stylesheet" type="text/css" href="' . getJSPath("themes/default/ext/resources/css/ext-all.css") . '" />'
47
+            . '<link rel="stylesheet" type="text/css" href="' . getJSPath("themes/default/ext/resources/css/xtheme-gray.css") . '" />';
48 48
 		 
49
-	global $theme;
50
-	if (is_dir("themes/$theme/ext/resources/css")) {
51
-			$cssDir = opendir("themes/$theme/ext/resources/css");
52
-			while (($file = readdir($cssDir)) !== false) {
53
-				if (strcasecmp(substr($file, -4), '.css' == 0)) {
54
-            		$ret .= "<link rel='stylesheet' type='text/css' href='" . getJSPath("themes/$theme/ext/resources/css/$file") . "' />";
55
-				}
56
-        	}
57
-	}
49
+    global $theme;
50
+    if (is_dir("themes/$theme/ext/resources/css")) {
51
+            $cssDir = opendir("themes/$theme/ext/resources/css");
52
+            while (($file = readdir($cssDir)) !== false) {
53
+                if (strcasecmp(substr($file, -4), '.css' == 0)) {
54
+                    $ret .= "<link rel='stylesheet' type='text/css' href='" . getJSPath("themes/$theme/ext/resources/css/$file") . "' />";
55
+                }
56
+            }
57
+    }
58 58
 			
59
-	return $ret;
59
+    return $ret;
60 60
 	
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.strip_semicolon.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,6 @@
 block discarded – undo
54 54
  */
55 55
 function smarty_modifier_strip_semicolon($text)
56 56
 {
57
-	return preg_replace("/([:]|\xEF\xBC\x9A)[\\s]*$/", '', trim($text));
57
+    return preg_replace("/([:]|\xEF\xBC\x9A)[\\s]*$/", '', trim($text));
58 58
 }
59 59
 ?>
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_help.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,15 +72,15 @@
 block discarded – undo
72 72
 function smarty_function_sugar_help($params, &$smarty)
73 73
 {
74 74
     $text = str_replace("'","\'",htmlspecialchars($params['text']));
75
-	//append any additional parameters.
76
-	$click  = "return SUGAR.util.showHelpTips(this,'$text'";
75
+    //append any additional parameters.
76
+    $click  = "return SUGAR.util.showHelpTips(this,'$text'";
77 77
 
78
-	if (count( $params) > 1){
78
+    if (count( $params) > 1){
79 79
 
80
-			$click .=",'".$params['myPos']."','".$params['atPos']."'";
81
-	}
80
+            $click .=",'".$params['myPos']."','".$params['atPos']."'";
81
+    }
82 82
     $helpImage = SugarThemeRegistry::current()->getImageURL('helpInline.png');
83
-	$click .= " );" ;
83
+    $click .= " );" ;
84 84
     $alt_tag = $GLOBALS['app_strings']['LBL_ALT_INFO'];
85 85
     return <<<EOHTML
86 86
 <img border="0"
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.default_date_value.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,8 +207,8 @@
 block discarded – undo
207 207
  * @return String representing date value
208 208
  */
209 209
 function smarty_modifier_default_date_value($defaultValue) {
210
-	global $timedate;
211
-	require_once('modules/DynamicFields/templates/Fields/TemplateDate.php');
212
-	$td = new TemplateDate();
213
-	return $timedate->asUser(new SugarDateTime($td->dateStrings[$defaultValue]));
210
+    global $timedate;
211
+    require_once('modules/DynamicFields/templates/Fields/TemplateDate.php');
212
+    $td = new TemplateDate();
213
+    return $timedate->asUser(new SugarDateTime($td->dateStrings[$defaultValue]));
214 214
 }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_getwebpath.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
  */
46 46
 function smarty_function_sugar_getwebpath($params, &$smarty)
47 47
 {
48
-	if(!isset($params['file'])) {
49
-		   $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
50
-	} 
51
- 	return getWebPath($params['file']);
48
+    if(!isset($params['file'])) {
49
+            $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
50
+    } 
51
+        return getWebPath($params['file']);
52 52
 }
53 53
 ?>
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.html_select_time.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         }
101 101
         $html_result .= '>'."\n";
102 102
         $html_result .= smarty_function_html_options(array('output'          => $hours,
103
-                                                           'values'          => $hours,
104
-                                                           'selected'      => strftime($hour_fmt, $time),
105
-                                                           'print_result' => false),
106
-                                                     $smarty);
103
+                                                            'values'          => $hours,
104
+                                                            'selected'      => strftime($hour_fmt, $time),
105
+                                                            'print_result' => false),
106
+                                                        $smarty);
107 107
         $html_result .= "</select>\n";
108 108
     }
109 109
 
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
         $html_result .= '>'."\n";
128 128
         
129 129
         $html_result .= smarty_function_html_options(array('output'          => $minutes,
130
-                                                           'values'          => $minutes,
131
-                                                           'selected'      => $selected,
132
-                                                           'print_result' => false),
133
-                                                     $smarty);
130
+                                                            'values'          => $minutes,
131
+                                                            'selected'      => $selected,
132
+                                                            'print_result' => false),
133
+                                                        $smarty);
134 134
         $html_result .= "</select>\n";
135 135
     }
136 136
 
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
         $html_result .= '>'."\n";
156 156
         
157 157
         $html_result .= smarty_function_html_options(array('output'          => $seconds,
158
-                                                           'values'          => $seconds,
159
-                                                           'selected'      => $selected,
160
-                                                           'print_result' => false),
161
-                                                     $smarty);
158
+                                                            'values'          => $seconds,
159
+                                                            'selected'      => $selected,
160
+                                                            'print_result' => false),
161
+                                                        $smarty);
162 162
         $html_result .= "</select>\n";
163 163
     }
164 164
 
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
         $html_result .= '>'."\n";
180 180
         
181 181
         $html_result .= smarty_function_html_options(array('output'          => array('AM', 'PM'),
182
-                                                           'values'          => array('am', 'pm'),
183
-                                                           'selected'      => strtolower(strftime('%p', $time)),
184
-                                                           'print_result' => false),
185
-                                                     $smarty);
182
+                                                            'values'          => array('am', 'pm'),
183
+                                                            'selected'      => strtolower(strftime('%p', $time)),
184
+                                                            'print_result' => false),
185
+                                                        $smarty);
186 186
         $html_result .= "</select>\n";
187 187
     }
188 188
 
Please login to merge, or discard this patch.