Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/Relationships/RelationshipHandler.php 1 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/ProspectLists/ProspectList.php 1 patch
Braces   +42 added lines, -31 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.
@@ -103,8 +105,7 @@  discard block
 block discarded – undo
103 105
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
104 106
         if(isset($GLOBALS['log'])) {
105 107
             $GLOBALS['log']->deprecated($deprecatedMessage);
106
-        }
107
-        else {
108
+        } else {
108 109
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
109 110
         }
110 111
         self::__construct();
@@ -137,19 +138,21 @@  discard block
 block discarded – undo
137 138
 			$where_auto = '1=1';
138 139
 				if($show_deleted == 0){
139 140
                 	$where_auto = "$this->table_name.deleted=0";
140
-				}else if($show_deleted == 1){
141
+				} else if($show_deleted == 1){
141 142
                 	$where_auto = "$this->table_name.deleted=1";
142 143
 				}
143 144
 
144
-		if($where != "")
145
-			$query .= "where $where AND ".$where_auto;
146
-		else
147
-			$query .= "where ".$where_auto;
145
+		if($where != "") {
146
+					$query .= "where $where AND ".$where_auto;
147
+		} else {
148
+					$query .= "where ".$where_auto;
149
+		}
148 150
 
149
-		if($order_by != "")
150
-			$query .= " ORDER BY $order_by";
151
-		else
152
-			$query .= " ORDER BY prospect_lists.name";
151
+		if($order_by != "") {
152
+					$query .= " ORDER BY $order_by";
153
+		} else {
154
+					$query .= " ORDER BY prospect_lists.name";
155
+		}
153 156
 
154 157
 		return $query;
155 158
 	}
@@ -167,15 +170,17 @@  discard block
 block discarded – undo
167 170
 
168 171
 		$where_auto = " prospect_lists.deleted=0";
169 172
 
170
-        if($where != "")
171
-                $query .= " WHERE $where AND ".$where_auto;
172
-        else
173
-                $query .= " WHERE ".$where_auto;
173
+        if($where != "") {
174
+                        $query .= " WHERE $where AND ".$where_auto;
175
+        } else {
176
+                        $query .= " WHERE ".$where_auto;
177
+        }
174 178
 
175
-        if($order_by != "")
176
-                $query .= " ORDER BY $order_by";
177
-        else
178
-                $query .= " ORDER BY prospect_lists.name";
179
+        if($order_by != "") {
180
+                        $query .= " ORDER BY $order_by";
181
+        } else {
182
+                        $query .= " ORDER BY prospect_lists.name";
183
+        }
179 184
         return $query;
180 185
     }
181 186
 
@@ -302,12 +307,15 @@  discard block
 block discarded – undo
302 307
 	function save_relationship_changes($is_update, $exclude = array())
303 308
     {
304 309
     	parent::save_relationship_changes($is_update, $exclude);
305
-		if($this->lead_id != "")
306
-	   		$this->set_prospect_relationship($this->id, $this->lead_id, "lead");
307
-    	if($this->contact_id != "")
308
-    		$this->set_prospect_relationship($this->id, $this->contact_id, "contact");
309
-    	if($this->prospect_id != "")
310
-    		$this->set_prospect_relationship($this->id, $this->contact_id, "prospect");
310
+		if($this->lead_id != "") {
311
+			   		$this->set_prospect_relationship($this->id, $this->lead_id, "lead");
312
+		}
313
+    	if($this->contact_id != "") {
314
+    	    		$this->set_prospect_relationship($this->id, $this->contact_id, "contact");
315
+    	}
316
+    	if($this->prospect_id != "") {
317
+    	    		$this->set_prospect_relationship($this->id, $this->contact_id, "prospect");
318
+    	}
311 319
     }
312 320
 
313 321
 	function set_prospect_relationship($prospect_list_id, &$link_ids, $link_name)
@@ -365,10 +373,11 @@  discard block
 block discarded – undo
365 373
 
366 374
 		$row = $this->db->fetchByAssoc($result);
367 375
 
368
-		if($row)
369
-			return $row['num'];
370
-		else
371
-			return 0;
376
+		if($row) {
377
+					return $row['num'];
378
+		} else {
379
+					return 0;
380
+		}
372 381
 	}
373 382
 
374 383
 
@@ -390,7 +399,9 @@  discard block
 block discarded – undo
390 399
 		$the_where = "";
391 400
 		foreach($where_clauses as $clause)
392 401
 		{
393
-			if($the_where != "") $the_where .= " or ";
402
+			if($the_where != "") {
403
+			    $the_where .= " or ";
404
+			}
394 405
 			$the_where .= $clause;
395 406
 		}
396 407
 
Please login to merge, or discard this patch.
modules/SchedulersJobs/SchedulersJob.php 1 patch
Braces   +6 added lines, -7 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.
@@ -110,8 +112,7 @@  discard block
 block discarded – undo
110 112
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
111 113
         if(isset($GLOBALS['log'])) {
112 114
             $GLOBALS['log']->deprecated($deprecatedMessage);
113
-        }
114
-        else {
115
+        } else {
115 116
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
116 117
         }
117 118
         self::__construct();
@@ -587,12 +588,10 @@  discard block
 block discarded – undo
587 588
                 } else {
588 589
                     return $this->resolution != self::JOB_FAILURE;
589 590
                 }
590
-            }
591
-            else {
591
+            } else {
592 592
                 $this->resolveJob(self::JOB_FAILURE, sprintf(translate('ERR_JOBTYPE', 'SchedulersJobs'), strip_tags($this->target)));
593 593
             }
594
-        }
595
-        else {
594
+        } else {
596 595
 		    $this->resolveJob(self::JOB_FAILURE, sprintf(translate('ERR_JOBTYPE', 'SchedulersJobs'), strip_tags($this->target)));
597 596
 		}
598 597
 		return false;
Please login to merge, or discard this patch.
modules/Connectors/ConnectorRecord.php 1 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/ACLActions/ACLAction.php 1 patch
Braces   +20 added lines, -15 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.
@@ -62,8 +64,7 @@  discard block
 block discarded – undo
62 64
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
63 65
         if(isset($GLOBALS['log'])) {
64 66
             $GLOBALS['log']->deprecated($deprecatedMessage);
65
-        }
66
-        else {
67
+        } else {
67 68
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
68 69
         }
69 70
         self::__construct();
@@ -100,7 +101,7 @@  discard block
 block discarded – undo
100 101
                 }
101 102
             }
102 103
 
103
-        }else{
104
+        } else{
104 105
             sugar_die("FAILED TO ADD: $category - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php");
105 106
         }
106 107
 
@@ -128,7 +129,7 @@  discard block
 block discarded – undo
128 129
                     $action->mark_deleted($row['id']);
129 130
                 }
130 131
             }
131
-        }else{
132
+        } else{
132 133
             sugar_die("FAILED TO REMOVE: $category : $name - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php");
133 134
         }
134 135
     }
@@ -196,7 +197,9 @@  discard block
 block discarded – undo
196 197
         global $ACLActions;
197 198
         $options = array();
198 199
 
199
-        if(empty($ACLActions[$type]['actions'][$action]['aclaccess']))return $options;
200
+        if(empty($ACLActions[$type]['actions'][$action]['aclaccess'])) {
201
+            return $options;
202
+        }
200 203
         foreach($ACLActions[$type]['actions'][$action]['aclaccess'] as $action){
201 204
             $options[$action] = ACLAction::AccessName($action);
202 205
         }
@@ -247,14 +250,14 @@  discard block
 block discarded – undo
247 250
         if(!$refresh && !empty($_SESSION['ACL'][$user_id])){
248 251
             if(empty($category) && empty($action)){
249 252
                 return $_SESSION['ACL'][$user_id];
250
-            }else{
253
+            } else{
251 254
                 if(!empty($category) && isset($_SESSION['ACL'][$user_id][$category])){
252 255
                     if(empty($action)){
253 256
                         if(empty($type)){
254 257
                             return $_SESSION['ACL'][$user_id][$category];
255 258
                         }
256 259
                         return $_SESSION['ACL'][$user_id][$category][$type];
257
-                    }else if(!empty($type) && isset($_SESSION['ACL'][$user_id][$category][$type][$action])){
260
+                    } else if(!empty($type) && isset($_SESSION['ACL'][$user_id][$category][$type][$action])){
258 261
                         return $_SESSION['ACL'][$user_id][$category][$type][$action];
259 262
                     }
260 263
                 }
@@ -374,12 +377,12 @@  discard block
 block discarded – undo
374 377
                 $_SESSION['ACL'] = array();
375 378
             }
376 379
             $_SESSION['ACL'][$user_id] = $selected_actions;
377
-        }else{
380
+        } else{
378 381
             if(empty($action) && !empty($category)){
379 382
                 if(!empty($type)){
380 383
                     $_SESSION['ACL'][$user_id][$category][$type] = $selected_actions[$category][$type];}
381 384
                 $_SESSION['ACL'][$user_id][$category] = $selected_actions[$category];
382
-            }else{
385
+            } else{
383 386
                 if(!empty($action) && !empty($category) && !empty($type)){
384 387
                 $_SESSION['ACL'][$user_id][$category][$type][$action] = $selected_actions[$category][$action];
385 388
 
@@ -398,8 +401,9 @@  discard block
 block discarded – undo
398 401
         // Fallback to array key if translation is empty
399 402
         $a = empty($app_list_strings['moduleList'][$a]) ? $a : $app_list_strings['moduleList'][$a];
400 403
         $b = empty($app_list_strings['moduleList'][$b]) ? $b : $app_list_strings['moduleList'][$b];
401
-        if ($a == $b)
402
-            return 0;
404
+        if ($a == $b) {
405
+                    return 0;
406
+        }
403 407
         return ($a < $b) ? -1 : 1;
404 408
     }
405 409
 
@@ -494,7 +498,9 @@  discard block
 block discarded – undo
494 498
         return true;
495 499
         }
496 500
         //check if we don't have it set in the cache if not lets reload the cache
497
-        if(ACLAction::getUserAccessLevel($user_id, $category, 'access', $type) < ACL_ALLOW_ENABLED) return false;
501
+        if(ACLAction::getUserAccessLevel($user_id, $category, 'access', $type) < ACL_ALLOW_ENABLED) {
502
+            return false;
503
+        }
498 504
         if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){
499 505
             ACLAction::getUserActions($user_id, false);
500 506
 
@@ -590,8 +596,7 @@  discard block
 block discarded – undo
590 596
                     if($cat_name=='Users'&& $act_name=='admin'){
591 597
                         $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEFAULT]=ACLAction::AccessName(ACL_ALLOW_DEFAULT);;
592 598
                         $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEV]=ACLAction::AccessName(ACL_ALLOW_DEV);;
593
-                    }
594
-                    else{
599
+                    } else{
595 600
                     $categories[$cat_name][$type_name][$act_name]['accessOptions'] =  ACLAction::getAccessOptions($act_name, $type_name);
596 601
                     }
597 602
                 }
Please login to merge, or discard this patch.
modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php 1 patch
Braces   +15 added lines, -14 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.
@@ -61,8 +63,7 @@  discard block
 block discarded – undo
61 63
 	    // check in custom dir first, in case someone want's to override an auth controller
62 64
 		if (file_exists('custom/modules/Users/authentication/'.$this->authenticationDir.'/' . $this->userAuthenticateClass . '.php')) {
63 65
             require_once('custom/modules/Users/authentication/'.$this->authenticationDir.'/' . $this->userAuthenticateClass . '.php');
64
-        }
65
-        elseif (file_exists('modules/Users/authentication/'.$this->authenticationDir.'/' . $this->userAuthenticateClass . '.php')) {
66
+        } elseif (file_exists('modules/Users/authentication/'.$this->authenticationDir.'/' . $this->userAuthenticateClass . '.php')) {
66 67
             require_once('modules/Users/authentication/'.$this->authenticationDir.'/' . $this->userAuthenticateClass . '.php');
67 68
         }
68 69
 
@@ -76,8 +77,7 @@  discard block
 block discarded – undo
76 77
 		$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
77 78
 		if(isset($GLOBALS['log'])) {
78 79
 			$GLOBALS['log']->deprecated($deprecatedMessage);
79
-		}
80
-		else {
80
+		} else {
81 81
 			trigger_error($deprecatedMessage, E_USER_DEPRECATED);
82 82
 		}
83 83
 		self::__construct();
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
 			}
114 114
 			return $this->postLoginAuthenticate();
115 115
 
116
-		}
117
-		else
116
+		} else
118 117
 		{
119 118
 			//if(!empty($usr_id) && $res['lockoutexpiration'] > 0){
120 119
             if(!empty($usr_id)){
121
-				if (($logout=$usr->getPreference('loginfailed'))=='')
122
-	        		$usr->setPreference('loginfailed','1');
123
-	    		else
124
-	        		$usr->setPreference('loginfailed',$logout+1);
120
+				if (($logout=$usr->getPreference('loginfailed'))=='') {
121
+					        		$usr->setPreference('loginfailed','1');
122
+				} else {
123
+	    			        		$usr->setPreference('loginfailed',$logout+1);
124
+	    		}
125 125
 	    		$usr->savePreferencesToDB();
126 126
     		}
127 127
 		}
@@ -160,7 +160,9 @@  discard block
 block discarded – undo
160 160
 		unset($_SESSION['ACL']);
161 161
 
162 162
 		//set the server unique key
163
-		if (isset ($sugar_config['unique_key']))$_SESSION['unique_key'] = $sugar_config['unique_key'];
163
+		if (isset ($sugar_config['unique_key'])) {
164
+		    $_SESSION['unique_key'] = $sugar_config['unique_key'];
165
+		}
164 166
 
165 167
 		//set user language
166 168
 		if (isset ($reset_language_on_default_user) && $reset_language_on_default_user && $GLOBALS['current_user']->user_name == $sugar_config['default_user_name']) {
@@ -277,8 +279,7 @@  discard block
 block discarded – undo
277 279
 				$client_parts = explode(".", $clientIP);
278 280
                 if(count($session_parts) < 4) {
279 281
                     $classCheck = 0;
280
-                }
281
-                else {
282
+                } else {
282 283
     				// match class C IP addresses
283 284
     				for ($i = 0; $i < 3; $i ++) {
284 285
     					if ($session_parts[$i] == $client_parts[$i]) {
Please login to merge, or discard this patch.
modules/Documents/Document.php 1 patch
Braces   +23 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry)
2
+if(!defined('sugarEntry') || !sugarEntry) {
3 3
 	die('Not A Valid Entry Point');
4
+}
4 5
 /*********************************************************************************
5 6
  * SugarCRM Community Edition is a customer relationship management program developed by
6 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -110,8 +111,7 @@  discard block
 block discarded – undo
110 111
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
111 112
         if(isset($GLOBALS['log'])) {
112 113
             $GLOBALS['log']->deprecated($deprecatedMessage);
113
-        }
114
-        else {
114
+        } else {
115 115
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
116 116
         }
117 117
         self::__construct();
@@ -252,9 +252,13 @@  discard block
 block discarded – undo
252 252
             	$this->name = $this->document_name;
253 253
             }
254 254
 
255
-            if(isset($row['filename']))$this->filename = $row['filename'];
255
+            if(isset($row['filename'])) {
256
+                $this->filename = $row['filename'];
257
+            }
256 258
             //$this->latest_revision = $row['revision'];
257
-            if(isset($row['revision']))$this->revision = $row['revision'];
259
+            if(isset($row['revision'])) {
260
+                $this->revision = $row['revision'];
261
+            }
258 262
 
259 263
             //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
260 264
             //if file is not found then default image file will be used.
@@ -281,7 +285,7 @@  discard block
 block discarded – undo
281 285
 
282 286
     		$this->file_url = $file_url;
283 287
     		$this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}";
284
-		}else{
288
+		} else{
285 289
             $this->file_url = "";
286 290
             $this->file_url_noimage = "";
287 291
 		}
@@ -321,15 +325,17 @@  discard block
 block discarded – undo
321 325
 
322 326
 		$where_auto = " documents.deleted = 0";
323 327
 
324
-		if ($where != "")
325
-			$query .= " WHERE $where AND ".$where_auto;
326
-		else
327
-			$query .= " WHERE ".$where_auto;
328
+		if ($where != "") {
329
+					$query .= " WHERE $where AND ".$where_auto;
330
+		} else {
331
+					$query .= " WHERE ".$where_auto;
332
+		}
328 333
 
329
-		if ($order_by != "")
330
-			$query .= " ORDER BY $order_by";
331
-		else
332
-			$query .= " ORDER BY documents.document_name";
334
+		if ($order_by != "") {
335
+					$query .= " ORDER BY $order_by";
336
+		} else {
337
+					$query .= " ORDER BY documents.document_name";
338
+		}
333 339
 
334 340
 		return $query;
335 341
 	}
@@ -389,7 +395,9 @@  discard block
 block discarded – undo
389 395
 
390 396
 	//static function.
391 397
 	function get_document_name($doc_id){
392
-		if (empty($doc_id)) return null;
398
+		if (empty($doc_id)) {
399
+		    return null;
400
+		}
393 401
 
394 402
 		$db = DBManagerFactory::getInstance();
395 403
 		$query="select document_name from documents where id='$doc_id'  and deleted=0";
Please login to merge, or discard this patch.
modules/UpgradeWizard/upgradeMetaHelper.php 1 patch
Braces   +14 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@  discard block
 block discarded – undo
83 83
 		$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
84 84
 		if(isset($GLOBALS['log'])) {
85 85
 			$GLOBALS['log']->deprecated($deprecatedMessage);
86
-		}
87
-		else {
86
+		} else {
88 87
 			trigger_error($deprecatedMessage, E_USER_DEPRECATED);
89 88
 		}
90 89
 		self::__construct($dir, $masterCopyDirecotry, $debugMode);
@@ -145,12 +144,10 @@  discard block
 block discarded – undo
145 144
 	$file_queries_file = $upgrade_progress_dir.'/files_queries.php';
146 145
 	if(file_exists($file_queries_file)){
147 146
 		include($file_queries_file);
148
-	}
149
-	else{
147
+	} else{
150 148
 		if(function_exists('sugar_fopen')){
151 149
 			sugar_fopen($file_queries_file, 'w+');
152
-		}
153
-		else{
150
+		} else{
154 151
 			fopen($file_queries_file, 'w+');
155 152
 		}
156 153
 	}
@@ -176,7 +173,9 @@  discard block
 block discarded – undo
176 173
     $modulesAll = getAllModules(); //keep all modules as well
177 174
     $allOtherModules = array_diff($modulesAll,$modules);
178 175
     foreach($modules as $mod) {
179
-	  if(!is_dir('modules/'.$mod)) continue;
176
+	  if(!is_dir('modules/'.$mod)) {
177
+	      continue;
178
+	  }
180 179
 	  $editView = "modules/$mod/EditView.html";
181 180
 	  $detailView ="modules/$mod/DetailView.html";
182 181
 	  $exclude_files[]=$editView;
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
 		       	  $fileContents = file_get_contents($file);
191 190
 		       	  if(md5($fileContents) != $md5_string['./'.$file]) {
192 191
 		       	  	$return_array[$mod][] = $file;
193
-		       	  }
194
-		       	  else{
192
+		       	  } else{
195 193
 		       	  	//keep in the array to be deleted later
196 194
 		       	  	$_SESSION['removeMd5MatchingFiles'][] = $file;
197 195
 		               	  }
@@ -202,7 +200,9 @@  discard block
 block discarded – undo
202 200
     //also check out other non-studio modules by taking the difference between
203 201
     //allMOdules and
204 202
   foreach($allOtherModules as $mod) {
205
-	  if(!is_dir('modules/'.$mod)) continue;
203
+	  if(!is_dir('modules/'.$mod)) {
204
+	      continue;
205
+	  }
206 206
 	  $allModFiles = array();
207 207
       $allModFiles = findAllFiles('modules/'.$mod,$allModFiles);
208 208
       foreach($allModFiles as $file){
@@ -251,8 +251,7 @@  discard block
 block discarded – undo
251 251
 	               	  	  $return_array[$mod];
252 252
 	               	  	  break;
253 253
 	               	  }
254
-               	  }
255
-               	  else{
254
+               	  } else{
256 255
                	  	// This is a new file in user's version and indicates that module has been
257 256
                	  	//customized. Put the module in the customized array.
258 257
                        echo 'New File'.$file;
@@ -275,7 +274,9 @@  discard block
 block discarded – undo
275 274
 		$modules = array();
276 275
 		$d = dir('modules');
277 276
 		while($e = $d->read()){
278
-			if(substr($e, 0, 1) == '.' || !is_dir('modules/' . $e))continue;
277
+			if(substr($e, 0, 1) == '.' || !is_dir('modules/' . $e)) {
278
+			    continue;
279
+			}
279 280
 			if(file_exists('modules/' . $e . '/metadata/studio.php')){
280 281
 			   $modules[] = $e;
281 282
 			}
Please login to merge, or discard this patch.
modules/Opportunities/OpportunitiesJjwg_MapsLogicHook.php 1 patch
Braces   +3 added lines, -3 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
 class OpportunitiesJjwg_MapsLogicHook {
7 8
 
@@ -17,8 +18,7 @@  discard block
 block discarded – undo
17 18
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
18 19
         if(isset($GLOBALS['log'])) {
19 20
             $GLOBALS['log']->deprecated($deprecatedMessage);
20
-        }
21
-        else {
21
+        } else {
22 22
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
23 23
         }
24 24
         self::__construct();
Please login to merge, or discard this patch.