Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/Employees/Employee.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
     /**
116 116
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
117 117
      */
118
-    function Employee(){
118
+    function Employee() {
119 119
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
120
-        if(isset($GLOBALS['log'])) {
120
+        if (isset($GLOBALS['log'])) {
121 121
             $GLOBALS['log']->deprecated($deprecatedMessage);
122 122
         }
123 123
         else {
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 	{
143 143
 		global $locale;
144 144
 		$query = "SELECT u1.first_name, u1.last_name from users u1, users u2 where u1.id = u2.reports_to_id AND u2.id = '$this->id' and u1.deleted=0";
145
-		$result =$this->db->query($query, true, "Error filling in additional detail fields") ;
145
+		$result = $this->db->query($query, true, "Error filling in additional detail fields");
146 146
 
147 147
 		$row = $this->db->fetchByAssoc($result);
148 148
 
149
-		if($row != null)
149
+		if ($row != null)
150 150
 		{
151 151
 			$this->reports_to_name = stripslashes($locale->getLocaleFormattedName($row['first_name'], $row['last_name']));
152 152
 		}
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	function retrieve_employee_id($employee_name)
160 160
 	{
161 161
 		$query = "SELECT id from users where user_name='$user_name' AND deleted=0";
162
-		$result  = $this->db->query($query, false,"Error retrieving employee ID: ");
162
+		$result = $this->db->query($query, false, "Error retrieving employee ID: ");
163 163
 		$row = $this->db->fetchByAssoc($result);
164 164
 		return $row['id'];
165 165
 	}
@@ -177,21 +177,21 @@  discard block
 block discarded – undo
177 177
 		return TRUE;
178 178
 	}
179 179
 
180
-	function get_list_view_data(){
180
+	function get_list_view_data() {
181 181
 
182 182
         $user_fields = parent::get_list_view_data();
183 183
 
184 184
 		// Copy over the reports_to_name
185
-		if ( isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]) )
185
+		if (isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]))
186 186
             $user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type];
187
-		if ( isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]) )
187
+		if (isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]))
188 188
             $user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status];
189 189
 		$user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
190 190
 
191 191
         return $user_fields;
192 192
 	}
193 193
 
194
-	function list_view_parse_additional_sections(&$list_form/*, $xTemplateSection*/){
194
+	function list_view_parse_additional_sections(&$list_form/*, $xTemplateSection*/) {
195 195
 		return $list_form;
196 196
 	}
197 197
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		include('modules/Employees/field_arrays.php');
201 201
 
202 202
 		$cols = '';
203
-		foreach($fields_array['Employee']['export_fields'] as $field) {
203
+		foreach ($fields_array['Employee']['export_fields'] as $field) {
204 204
 			$cols .= (empty($cols)) ? '' : ', ';
205 205
 			$cols .= $field;
206 206
 		}
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$where_auto = " users.deleted = 0";
211 211
 
212
-		if($where != "")
213
-			$query .= " WHERE $where AND " . $where_auto;
212
+		if ($where != "")
213
+			$query .= " WHERE $where AND ".$where_auto;
214 214
 		else
215
-			$query .= " WHERE " . $where_auto;
215
+			$query .= " WHERE ".$where_auto;
216 216
 
217
-		if($order_by != "")
217
+		if ($order_by != "")
218 218
 			$query .= " ORDER BY $order_by";
219 219
 		else
220 220
 			$query .= " ORDER BY users.user_name";
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	}
236 236
 	*/
237 237
 
238
-	function preprocess_fields_on_save(){
238
+	function preprocess_fields_on_save() {
239 239
 		parent::preprocess_fields_on_save();
240 240
 
241 241
 	}
@@ -259,17 +259,17 @@  discard block
 block discarded – undo
259 259
      * @param boolean $singleSelect Optional, default false.
260 260
      * @return String select query string, optionally an array value will be returned if $return_array= true.
261 261
      */
262
-	function create_new_list_query($order_by, $where,$filter=array(),$params=array(), $show_deleted = 0,$join_type='', $return_array = false,$parentbean=null, $singleSelect = false, $ifListForExport = false)
262
+	function create_new_list_query($order_by, $where, $filter = array(), $params = array(), $show_deleted = 0, $join_type = '', $return_array = false, $parentbean = null, $singleSelect = false, $ifListForExport = false)
263 263
     {
264 264
         //create the filter for portal only users, as they should not be showing up in query results
265
-        if(empty($where)){
265
+        if (empty($where)) {
266 266
             $where = ' users.portal_only = 0 ';
267
-        }else{
267
+        } else {
268 268
             $where .= ' and users.portal_only = 0 ';
269 269
         }
270 270
 
271 271
         //return parent method, specifying for array to be returned
272
-        return parent::create_new_list_query($order_by, $where, $filter,$params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect, $ifListForExport);
272
+        return parent::create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect, $ifListForExport);
273 273
     }
274 274
 
275 275
     /*
@@ -280,10 +280,10 @@  discard block
 block discarded – undo
280 280
 
281 281
         //Check to see if there are custom user fields that we should report on, first check the custom_fields array
282 282
         $userCustomfields = !empty($GLOBALS['dictionary']['Employee']['custom_fields']);
283
-        if(!$userCustomfields){
283
+        if (!$userCustomfields) {
284 284
             //custom Fields not set, so traverse employee fields to see if any custom fields exist
285
-            foreach ($GLOBALS['dictionary']['Employee']['fields'] as $k=>$v){
286
-                if(!empty($v['source']) && $v['source'] == 'custom_fields'){
285
+            foreach ($GLOBALS['dictionary']['Employee']['fields'] as $k=>$v) {
286
+                if (!empty($v['source']) && $v['source'] == 'custom_fields') {
287 287
                     //custom field has been found, set flag to true and break
288 288
                     $userCustomfields = true;
289 289
                     break;
Please login to merge, or discard this patch.
Braces   +22 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -119,8 +121,7 @@  discard block
 block discarded – undo
119 121
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
120 122
         if(isset($GLOBALS['log'])) {
121 123
             $GLOBALS['log']->deprecated($deprecatedMessage);
122
-        }
123
-        else {
124
+        } else {
124 125
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
125 126
         }
126 127
         self::__construct();
@@ -149,8 +150,7 @@  discard block
 block discarded – undo
149 150
 		if($row != null)
150 151
 		{
151 152
 			$this->reports_to_name = stripslashes($locale->getLocaleFormattedName($row['first_name'], $row['last_name']));
152
-		}
153
-		else
153
+		} else
154 154
 		{
155 155
 			$this->reports_to_name = '';
156 156
 		}
@@ -182,10 +182,12 @@  discard block
 block discarded – undo
182 182
         $user_fields = parent::get_list_view_data();
183 183
 
184 184
 		// Copy over the reports_to_name
185
-		if ( isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]) )
186
-            $user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type];
187
-		if ( isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]) )
188
-            $user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status];
185
+		if ( isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]) ) {
186
+		            $user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type];
187
+		}
188
+		if ( isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]) ) {
189
+		            $user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status];
190
+		}
189 191
 		$user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
190 192
 
191 193
         return $user_fields;
@@ -209,15 +211,17 @@  discard block
 block discarded – undo
209 211
 
210 212
 		$where_auto = " users.deleted = 0";
211 213
 
212
-		if($where != "")
213
-			$query .= " WHERE $where AND " . $where_auto;
214
-		else
215
-			$query .= " WHERE " . $where_auto;
214
+		if($where != "") {
215
+					$query .= " WHERE $where AND " . $where_auto;
216
+		} else {
217
+					$query .= " WHERE " . $where_auto;
218
+		}
216 219
 
217
-		if($order_by != "")
218
-			$query .= " ORDER BY $order_by";
219
-		else
220
-			$query .= " ORDER BY users.user_name";
220
+		if($order_by != "") {
221
+					$query .= " ORDER BY $order_by";
222
+		} else {
223
+					$query .= " ORDER BY users.user_name";
224
+		}
221 225
 
222 226
 		return $query;
223 227
 	}
@@ -264,7 +268,7 @@  discard block
 block discarded – undo
264 268
         //create the filter for portal only users, as they should not be showing up in query results
265 269
         if(empty($where)){
266 270
             $where = ' users.portal_only = 0 ';
267
-        }else{
271
+        } else{
268 272
             $where .= ' and users.portal_only = 0 ';
269 273
         }
270 274
 
Please login to merge, or discard this patch.
modules/jjwg_Areas/views/view.area_detail_map.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
4 4
 
5 5
 class Jjwg_AreasViewArea_Detail_Map extends SugarView {
6 6
 
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     /**
12 12
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
13 13
      */
14
-    public function Jjwg_AreasViewArea_Detail_Map(){
14
+    public function Jjwg_AreasViewArea_Detail_Map() {
15 15
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
16
-        if(isset($GLOBALS['log'])) {
16
+        if (isset($GLOBALS['log'])) {
17 17
             $GLOBALS['log']->deprecated($deprecatedMessage);
18 18
         }
19 19
         else {
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.
modules/jjwg_Areas/views/view.area_edit_map.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
4 4
 
5 5
 class Jjwg_AreasViewArea_Edit_Map extends SugarView {
6 6
 
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     /**
12 12
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
13 13
      */
14
-    function Jjwg_AreasViewArea_Edit_Map(){
14
+    function Jjwg_AreasViewArea_Edit_Map() {
15 15
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
16
-        if(isset($GLOBALS['log'])) {
16
+        if (isset($GLOBALS['log'])) {
17 17
             $GLOBALS['log']->deprecated($deprecatedMessage);
18 18
         }
19 19
         else {
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.
modules/jjwg_Areas/jjwg_Areas.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
      */
38 38
     var $centroid = null;
39 39
 
40
-    function __construct($init=true) {
40
+    function __construct($init = true) {
41 41
 
42 42
         parent::__construct();
43 43
         // Admin Config Setting
44
-        if($init) $this->configuration();
44
+        if ($init) $this->configuration();
45 45
     }
46 46
 
47 47
     /**
48 48
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
49 49
      */
50
-    function jjwg_Areas($init=true){
50
+    function jjwg_Areas($init = true) {
51 51
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
52
-        if(isset($GLOBALS['log'])) {
52
+        if (isset($GLOBALS['log'])) {
53 53
             $GLOBALS['log']->deprecated($deprecatedMessage);
54 54
         }
55 55
         else {
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
         $p[] = $p[0];
155 155
 
156 156
         for ($i = 0; $i < $n; $i++) {
157
-            $cx += ($p[$i]['lng'] + $p[$i+1]['lng']) * ( ($p[$i]['lng'] * $p[$i+1]['lat']) - ($p[$i+1]['lng'] * $p[$i]['lat']) );
158
-            $cy += ($p[$i]['lat'] + $p[$i+1]['lat']) * ( ($p[$i]['lng'] * $p[$i+1]['lat']) - ($p[$i+1]['lng'] * $p[$i]['lat']) );
157
+            $cx += ($p[$i]['lng'] + $p[$i + 1]['lng']) * (($p[$i]['lng'] * $p[$i + 1]['lat']) - ($p[$i + 1]['lng'] * $p[$i]['lat']));
158
+            $cy += ($p[$i]['lat'] + $p[$i + 1]['lat']) * (($p[$i]['lng'] * $p[$i + 1]['lat']) - ($p[$i + 1]['lng'] * $p[$i]['lat']));
159 159
         }
160
-        $centroid_lng = -(1/(6*$a))*$cx;
161
-        $centroid_lat = -(1/(6*$a))*$cy;
160
+        $centroid_lng = -(1 / (6 * $a)) * $cx;
161
+        $centroid_lat = -(1 / (6 * $a)) * $cy;
162 162
 
163 163
         if ($centroid_lng != 0 && $centroid_lat != 0) {
164 164
             $this->centroid = array(
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         // Chek $polygon count
302 302
         if (!(count($polygon) > 1)) return false;
303 303
         // Add the first point to the end, in order to properly close the loop completely
304
-        if ($polygon[count($polygon)-1] != $polygon[0]) $polygon[] = $polygon[0];
304
+        if ($polygon[count($polygon) - 1] != $polygon[0]) $polygon[] = $polygon[0];
305 305
 
306 306
         // Transform string coordinates into arrays with x and y values
307 307
         $point = $this->point_string_to_coordinates($point);
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
         $intersections = 0;
320 320
         $vertices_count = count($vertices);
321 321
 
322
-        for ($i=1; $i < $vertices_count; $i++) {
323
-            $vertex1 = $vertices[$i-1];
322
+        for ($i = 1; $i < $vertices_count; $i++) {
323
+            $vertex1 = $vertices[$i - 1];
324 324
             $vertex2 = $vertices[$i];
325 325
             if ($vertex1['y'] == $vertex2['y'] and $vertex1['y'] == $point['y'] and $point['x'] > min($vertex1['x'], $vertex2['x']) and $point['x'] < max($vertex1['x'], $vertex2['x'])) { // Check if point is on an horizontal polygon boundary
326 326
                 return true;
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 
346 346
     function point_on_vertex($point, $vertices) {
347 347
 
348
-        foreach($vertices as $vertex) {
348
+        foreach ($vertices as $vertex) {
349 349
             if ($point == $vertex) {
350 350
                 return true;
351 351
             }
Please login to merge, or discard this patch.
Braces   +30 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('sugarEntry') || !sugarEntry)
3
+if (!defined('sugarEntry') || !sugarEntry) {
4 4
     die('Not A Valid Entry Point');
5
+}
5 6
 
6 7
 require_once('modules/jjwg_Areas/jjwg_Areas_sugar.php');
7 8
 require_once('modules/jjwg_Maps/jjwg_Maps.php');
@@ -41,7 +42,9 @@  discard block
 block discarded – undo
41 42
 
42 43
         parent::__construct();
43 44
         // Admin Config Setting
44
-        if($init) $this->configuration();
45
+        if($init) {
46
+            $this->configuration();
47
+        }
45 48
     }
46 49
 
47 50
     /**
@@ -51,8 +54,7 @@  discard block
 block discarded – undo
51 54
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
52 55
         if(isset($GLOBALS['log'])) {
53 56
             $GLOBALS['log']->deprecated($deprecatedMessage);
54
-        }
55
-        else {
57
+        } else {
56 58
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
57 59
         }
58 60
         self::__construct($init);
@@ -91,7 +93,9 @@  discard block
 block discarded – undo
91 93
      */
92 94
     function define_polygon() {
93 95
 
94
-        if (!empty($this->polygon)) return $this->polygon;
96
+        if (!empty($this->polygon)) {
97
+            return $this->polygon;
98
+        }
95 99
 
96 100
         if (preg_match('/[\n\r]/', $this->coordinates)) {
97 101
             $this->coords = preg_split("/[\n\r\s]+/", $this->coordinates, null, PREG_SPLIT_NO_EMPTY);
@@ -140,13 +144,19 @@  discard block
 block discarded – undo
140 144
      */
141 145
     function define_centroid() {
142 146
 
143
-        if (!empty($this->centroid)) return $this->centroid;
147
+        if (!empty($this->centroid)) {
148
+            return $this->centroid;
149
+        }
144 150
 
145
-        if (empty($this->polygon)) $this->polygon = $this->define_polygon();
151
+        if (empty($this->polygon)) {
152
+            $this->polygon = $this->define_polygon();
153
+        }
146 154
 
147 155
         $n = count($this->polygon);
148 156
         $a = $this->define_area($this->polygon);
149
-        if (empty($a)) return $this->centroid;
157
+        if (empty($a)) {
158
+            return $this->centroid;
159
+        }
150 160
         $cx = 0.0;
151 161
         $cy = 0.0;
152 162
         // Set $p as Polygon and Add Closing Point
@@ -177,9 +187,13 @@  discard block
 block discarded – undo
177 187
      */
178 188
     function define_area() {
179 189
 
180
-        if (!empty($this->area)) return $this->area;
190
+        if (!empty($this->area)) {
191
+            return $this->area;
192
+        }
181 193
 
182
-        if (empty($this->polygon)) $this->polygon = $this->define_polygon();
194
+        if (empty($this->polygon)) {
195
+            $this->polygon = $this->define_polygon();
196
+        }
183 197
 
184 198
         // Based on: http://forums.devnetwork.net/viewtopic.php?f=1&t=44074
185 199
         $n = count($this->polygon);
@@ -299,9 +313,13 @@  discard block
 block discarded – undo
299 313
         $polygon = preg_split('/[\s]+/', $this->coordinates);
300 314
 
301 315
         // Chek $polygon count
302
-        if (!(count($polygon) > 1)) return false;
316
+        if (!(count($polygon) > 1)) {
317
+            return false;
318
+        }
303 319
         // Add the first point to the end, in order to properly close the loop completely
304
-        if ($polygon[count($polygon)-1] != $polygon[0]) $polygon[] = $polygon[0];
320
+        if ($polygon[count($polygon)-1] != $polygon[0]) {
321
+            $polygon[] = $polygon[0];
322
+        }
305 323
 
306 324
         // Transform string coordinates into arrays with x and y values
307 325
         $point = $this->point_string_to_coordinates($point);
Please login to merge, or discard this patch.
modules/jjwg_Areas/Dashlets/jjwg_AreasDashlet/jjwg_AreasDashlet.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
     /**
27 27
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
28 28
      */
29
-    function jjwg_AreasDashlet($id, $def = null){
29
+    function jjwg_AreasDashlet($id, $def = null) {
30 30
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
31
-        if(isset($GLOBALS['log'])) {
31
+        if (isset($GLOBALS['log'])) {
32 32
             $GLOBALS['log']->deprecated($deprecatedMessage);
33 33
         }
34 34
         else {
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('sugarEntry') || !sugarEntry)
3
+if (!defined('sugarEntry') || !sugarEntry) {
4 4
     die('Not A Valid Entry Point');
5
+}
5 6
 
6 7
 require_once('include/Dashlets/DashletGeneric.php');
7 8
 require_once('modules/jjwg_Areas/jjwg_Areas.php');
@@ -14,8 +15,9 @@  discard block
 block discarded – undo
14 15
 
15 16
         parent::__construct($id, $def);
16 17
 
17
-        if (empty($def['title']))
18
-            $this->title = translate('LBL_HOMEPAGE_TITLE', 'jjwg_Areas');
18
+        if (empty($def['title'])) {
19
+                    $this->title = translate('LBL_HOMEPAGE_TITLE', 'jjwg_Areas');
20
+        }
19 21
 
20 22
         $this->searchFields = $dashletData['jjwg_AreasDashlet']['searchFields'];
21 23
         $this->columns = $dashletData['jjwg_AreasDashlet']['columns'];
@@ -30,8 +32,7 @@  discard block
 block discarded – undo
30 32
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
31 33
         if(isset($GLOBALS['log'])) {
32 34
             $GLOBALS['log']->deprecated($deprecatedMessage);
33
-        }
34
-        else {
35
+        } else {
35 36
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
36 37
         }
37 38
         self::__construct($id, $def);
Please login to merge, or discard this patch.
modules/Releases/Release.php 3 patches
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -50,30 +50,30 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
 class Release extends SugarBean {
53
-	// Stored fields
54
-	var $id;
55
-	var $deleted;
56
-	var $date_entered;
57
-	var $date_modified;
58
-	var $modified_user_id;
59
-	var $created_by;
60
-	var $created_by_name;
61
-	var $modified_by_name;
62
-	var $name;
63
-	var $status;
64
-
65
-	var $table_name = "releases";
66
-
67
-	var $object_name = "Release";
68
-	var $module_dir = 'Releases';
69
-	var $new_schema = true;
70
-
71
-	// This is used to retrieve related fields from form posts.
72
-	var $additional_column_fields = Array();
53
+    // Stored fields
54
+    var $id;
55
+    var $deleted;
56
+    var $date_entered;
57
+    var $date_modified;
58
+    var $modified_user_id;
59
+    var $created_by;
60
+    var $created_by_name;
61
+    var $modified_by_name;
62
+    var $name;
63
+    var $status;
64
+
65
+    var $table_name = "releases";
66
+
67
+    var $object_name = "Release";
68
+    var $module_dir = 'Releases';
69
+    var $new_schema = true;
70
+
71
+    // This is used to retrieve related fields from form posts.
72
+    var $additional_column_fields = Array();
73 73
 
74 74
     public function __construct() {
75
-		parent::__construct();
76
-	}
75
+        parent::__construct();
76
+    }
77 77
 
78 78
     /**
79 79
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
@@ -90,83 +90,83 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
 
93
-	function get_summary_text()
94
-	{
95
-		return "$this->name";
96
-	}
97
-
98
-	function get_releases($add_blank=false,$status='Active',$where='')
99
-	{
100
-		if($where!='') {
101
-			$query = "SELECT id, name FROM $this->table_name where ". $where ." and deleted=0 ";
102
-		}
103
-		else {
104
-			$query = "SELECT id, name FROM $this->table_name where deleted=0 ";
105
-		}
106
-		if ($status=='Active') {
107
-			$query .= " and status='Active' ";
108
-		}
109
-		elseif ($status=='Hidden') {
110
-			$query .= " and status='Hidden' ";
111
-		}
112
-		elseif ($status=='All') {
113
-		}
114
-		$query .= " order by list_order asc";
115
-		$result = $this->db->query($query, false);
116
-		$GLOBALS['log']->debug("get_releases: result is ".var_export($result, true));
117
-
118
-		$list = array();
119
-		if ($add_blank) {
120
-			$list['']='';
121
-		}
122
-		//if($this->db->getRowCount($result) > 0){
123
-			// We have some data.
124
-			while (($row = $this->db->fetchByAssoc($result)) != null) {
125
-			//while ($row = $this->db->fetchByAssoc($result)) {
126
-				$list[$row['id']] = $row['name'];
127
-				$GLOBALS['log']->debug("row id is:".$row['id']);
128
-				$GLOBALS['log']->debug("row name is:".$row['name']);
129
-			}
130
-		//}
131
-		return $list;
132
-	}
133
-
134
-	function fill_in_additional_list_fields()
135
-	{
136
-		$this->fill_in_additional_detail_fields();
137
-	}
138
-
139
-	function fill_in_additional_detail_fields() {
140
-
141
-	}
142
-
143
-	function get_list_view_data(){
144
-		global $app_list_strings;
145
-		$temp_array = $this->get_list_view_array();
93
+    function get_summary_text()
94
+    {
95
+        return "$this->name";
96
+    }
97
+
98
+    function get_releases($add_blank=false,$status='Active',$where='')
99
+    {
100
+        if($where!='') {
101
+            $query = "SELECT id, name FROM $this->table_name where ". $where ." and deleted=0 ";
102
+        }
103
+        else {
104
+            $query = "SELECT id, name FROM $this->table_name where deleted=0 ";
105
+        }
106
+        if ($status=='Active') {
107
+            $query .= " and status='Active' ";
108
+        }
109
+        elseif ($status=='Hidden') {
110
+            $query .= " and status='Hidden' ";
111
+        }
112
+        elseif ($status=='All') {
113
+        }
114
+        $query .= " order by list_order asc";
115
+        $result = $this->db->query($query, false);
116
+        $GLOBALS['log']->debug("get_releases: result is ".var_export($result, true));
117
+
118
+        $list = array();
119
+        if ($add_blank) {
120
+            $list['']='';
121
+        }
122
+        //if($this->db->getRowCount($result) > 0){
123
+            // We have some data.
124
+            while (($row = $this->db->fetchByAssoc($result)) != null) {
125
+            //while ($row = $this->db->fetchByAssoc($result)) {
126
+                $list[$row['id']] = $row['name'];
127
+                $GLOBALS['log']->debug("row id is:".$row['id']);
128
+                $GLOBALS['log']->debug("row name is:".$row['name']);
129
+            }
130
+        //}
131
+        return $list;
132
+    }
133
+
134
+    function fill_in_additional_list_fields()
135
+    {
136
+        $this->fill_in_additional_detail_fields();
137
+    }
138
+
139
+    function fill_in_additional_detail_fields() {
140
+
141
+    }
142
+
143
+    function get_list_view_data(){
144
+        global $app_list_strings;
145
+        $temp_array = $this->get_list_view_array();
146 146
         $temp_array["ENCODED_NAME"]=$this->name;
147 147
         $temp_array['ENCODED_STATUS'] = $app_list_strings['release_status_dom'][$this->status];
148 148
 //	$temp_array["ENCODED_NAME"]=htmlspecialchars($this->name, ENT_QUOTES);
149
-    	return $temp_array;
149
+        return $temp_array;
150 150
 
151
-	}
152
-	/**
151
+    }
152
+    /**
153 153
 		builds a generic search based on the query string using or
154 154
 		do not include any $this-> because this is called on without having the class instantiated
155
-	*/
156
-	function build_generic_where_clause ($the_query_string) {
157
-	$where_clauses = Array();
158
-	$the_query_string = $GLOBALS['db']->quote($the_query_string);
159
-	array_push($where_clauses, "name like '$the_query_string%'");
160
-
161
-	$the_where = "";
162
-	foreach($where_clauses as $clause)
163
-	{
164
-		if($the_where != "") $the_where .= " or ";
165
-		$the_where .= $clause;
166
-	}
155
+     */
156
+    function build_generic_where_clause ($the_query_string) {
157
+    $where_clauses = Array();
158
+    $the_query_string = $GLOBALS['db']->quote($the_query_string);
159
+    array_push($where_clauses, "name like '$the_query_string%'");
160
+
161
+    $the_where = "";
162
+    foreach($where_clauses as $clause)
163
+    {
164
+        if($the_where != "") $the_where .= " or ";
165
+        $the_where .= $clause;
166
+    }
167 167
 
168 168
 
169
-	return $the_where;
169
+    return $the_where;
170 170
 }
171 171
 
172 172
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
     /**
79 79
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
80 80
      */
81
-    public function Release(){
81
+    public function Release() {
82 82
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
83
-        if(isset($GLOBALS['log'])) {
83
+        if (isset($GLOBALS['log'])) {
84 84
             $GLOBALS['log']->deprecated($deprecatedMessage);
85 85
         }
86 86
         else {
@@ -95,21 +95,21 @@  discard block
 block discarded – undo
95 95
 		return "$this->name";
96 96
 	}
97 97
 
98
-	function get_releases($add_blank=false,$status='Active',$where='')
98
+	function get_releases($add_blank = false, $status = 'Active', $where = '')
99 99
 	{
100
-		if($where!='') {
101
-			$query = "SELECT id, name FROM $this->table_name where ". $where ." and deleted=0 ";
100
+		if ($where != '') {
101
+			$query = "SELECT id, name FROM $this->table_name where ".$where." and deleted=0 ";
102 102
 		}
103 103
 		else {
104 104
 			$query = "SELECT id, name FROM $this->table_name where deleted=0 ";
105 105
 		}
106
-		if ($status=='Active') {
106
+		if ($status == 'Active') {
107 107
 			$query .= " and status='Active' ";
108 108
 		}
109
-		elseif ($status=='Hidden') {
109
+		elseif ($status == 'Hidden') {
110 110
 			$query .= " and status='Hidden' ";
111 111
 		}
112
-		elseif ($status=='All') {
112
+		elseif ($status == 'All') {
113 113
 		}
114 114
 		$query .= " order by list_order asc";
115 115
 		$result = $this->db->query($query, false);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		$list = array();
119 119
 		if ($add_blank) {
120
-			$list['']='';
120
+			$list[''] = '';
121 121
 		}
122 122
 		//if($this->db->getRowCount($result) > 0){
123 123
 			// We have some data.
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
 
141 141
 	}
142 142
 
143
-	function get_list_view_data(){
143
+	function get_list_view_data() {
144 144
 		global $app_list_strings;
145 145
 		$temp_array = $this->get_list_view_array();
146
-        $temp_array["ENCODED_NAME"]=$this->name;
146
+        $temp_array["ENCODED_NAME"] = $this->name;
147 147
         $temp_array['ENCODED_STATUS'] = $app_list_strings['release_status_dom'][$this->status];
148 148
 //	$temp_array["ENCODED_NAME"]=htmlspecialchars($this->name, ENT_QUOTES);
149 149
     	return $temp_array;
@@ -153,15 +153,15 @@  discard block
 block discarded – undo
153 153
 		builds a generic search based on the query string using or
154 154
 		do not include any $this-> because this is called on without having the class instantiated
155 155
 	*/
156
-	function build_generic_where_clause ($the_query_string) {
156
+	function build_generic_where_clause($the_query_string) {
157 157
 	$where_clauses = Array();
158 158
 	$the_query_string = $GLOBALS['db']->quote($the_query_string);
159 159
 	array_push($where_clauses, "name like '$the_query_string%'");
160 160
 
161 161
 	$the_where = "";
162
-	foreach($where_clauses as $clause)
162
+	foreach ($where_clauses as $clause)
163 163
 	{
164
-		if($the_where != "") $the_where .= " or ";
164
+		if ($the_where != "") $the_where .= " or ";
165 165
 		$the_where .= $clause;
166 166
 	}
167 167
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -82,8 +84,7 @@  discard block
 block discarded – undo
82 84
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
83 85
         if(isset($GLOBALS['log'])) {
84 86
             $GLOBALS['log']->deprecated($deprecatedMessage);
85
-        }
86
-        else {
87
+        } else {
87 88
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
88 89
         }
89 90
         self::__construct();
@@ -99,17 +100,14 @@  discard block
 block discarded – undo
99 100
 	{
100 101
 		if($where!='') {
101 102
 			$query = "SELECT id, name FROM $this->table_name where ". $where ." and deleted=0 ";
102
-		}
103
-		else {
103
+		} else {
104 104
 			$query = "SELECT id, name FROM $this->table_name where deleted=0 ";
105 105
 		}
106 106
 		if ($status=='Active') {
107 107
 			$query .= " and status='Active' ";
108
-		}
109
-		elseif ($status=='Hidden') {
108
+		} elseif ($status=='Hidden') {
110 109
 			$query .= " and status='Hidden' ";
111
-		}
112
-		elseif ($status=='All') {
110
+		} elseif ($status=='All') {
113 111
 		}
114 112
 		$query .= " order by list_order asc";
115 113
 		$result = $this->db->query($query, false);
@@ -161,7 +159,9 @@  discard block
 block discarded – undo
161 159
 	$the_where = "";
162 160
 	foreach($where_clauses as $clause)
163 161
 	{
164
-		if($the_where != "") $the_where .= " or ";
162
+		if($the_where != "") {
163
+		    $the_where .= " or ";
164
+		}
165 165
 		$the_where .= $clause;
166 166
 	}
167 167
 
Please login to merge, or discard this patch.
modules/AOW_Processed/AOW_Processed.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	var $object_name = 'AOW_Processed';
30 30
 	var $table_name = 'aow_processed';
31 31
 	var $importable = false;
32
-	var $disable_row_level_security = true ;
32
+	var $disable_row_level_security = true;
33 33
 
34 34
 	var $id;
35 35
 	var $name;
@@ -51,16 +51,16 @@  discard block
 block discarded – undo
51 51
 	var $parent_type;
52 52
 	var $status;
53 53
 
54
-	function __construct(){
54
+	function __construct() {
55 55
 		parent::__construct();
56 56
 	}
57 57
 
58 58
     /**
59 59
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
60 60
      */
61
-    function AOW_Processed(){
61
+    function AOW_Processed() {
62 62
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
63
-        if(isset($GLOBALS['log'])) {
63
+        if (isset($GLOBALS['log'])) {
64 64
             $GLOBALS['log']->deprecated($deprecatedMessage);
65 65
         }
66 66
         else {
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
 
73
-	function bean_implements($interface){
74
-		switch($interface){
73
+	function bean_implements($interface) {
74
+		switch ($interface) {
75 75
 			case 'ACL': return true;
76 76
 		}
77 77
 		return false;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
24 24
         if(isset($GLOBALS['log'])) {
25 25
             $GLOBALS['log']->deprecated($deprecatedMessage);
26
-        }
27
-        else {
26
+        } else {
28 27
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
29 28
         }
30 29
         self::__construct($seed, $module, $subPanel, $options);
Please login to merge, or discard this patch.
modules/AOW_Processed/views/view.list.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /**
4 4
  * Advanced OpenWorkflow, Automating SugarCRM.
5 5
  * @package Advanced OpenWorkflow for SugarCRM
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
35 35
      */
36
-    function AOW_ProcessedViewList(){
36
+    function AOW_ProcessedViewList() {
37 37
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
38
-        if(isset($GLOBALS['log'])) {
38
+        if (isset($GLOBALS['log'])) {
39 39
             $GLOBALS['log']->deprecated($deprecatedMessage);
40 40
         }
41 41
         else {
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.
AOW_Processed/Dashlets/AOW_ProcessedDashlet/AOW_ProcessedDashlet.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /**
4 4
  * Advanced OpenWorkflow, Automating SugarCRM.
5 5
  * @package Advanced OpenWorkflow for SugarCRM
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         parent::__construct($id, $def);
36 36
 
37
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOW_Processed');
37
+        if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOW_Processed');
38 38
 
39 39
         $this->searchFields = $dashletData['AOW_ProcessedDashlet']['searchFields'];
40 40
         $this->columns = $dashletData['AOW_ProcessedDashlet']['columns'];
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
47 47
      */
48
-    function AOW_ProcessedDashlet($id, $def = null){
48
+    function AOW_ProcessedDashlet($id, $def = null) {
49 49
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
50
-        if(isset($GLOBALS['log'])) {
50
+        if (isset($GLOBALS['log'])) {
51 51
             $GLOBALS['log']->deprecated($deprecatedMessage);
52 52
         }
53 53
         else {
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /**
4 6
  * Advanced OpenWorkflow, Automating SugarCRM.
5 7
  * @package Advanced OpenWorkflow for SugarCRM
@@ -34,7 +36,9 @@  discard block
 block discarded – undo
34 36
 
35 37
         parent::__construct($id, $def);
36 38
 
37
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOW_Processed');
39
+        if(empty($def['title'])) {
40
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOW_Processed');
41
+        }
38 42
 
39 43
         $this->searchFields = $dashletData['AOW_ProcessedDashlet']['searchFields'];
40 44
         $this->columns = $dashletData['AOW_ProcessedDashlet']['columns'];
@@ -49,8 +53,7 @@  discard block
 block discarded – undo
49 53
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
50 54
         if(isset($GLOBALS['log'])) {
51 55
             $GLOBALS['log']->deprecated($deprecatedMessage);
52
-        }
53
-        else {
56
+        } else {
54 57
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
55 58
         }
56 59
         self::__construct($id, $def);
Please login to merge, or discard this patch.