Completed
Push — developer ( 7f46f3...3f66fa )
by Błażej
134:52 queued 72:56
created
include/ConfigUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@
 block discarded – undo
61 61
 		self::$modules[$module] = $CONFIG;
62 62
 		switch ($argsLength) {
63 63
 			case 2:
64
-				if (!isset($CONFIG[$key]))
65
-					return false;
64
+				if (!isset($CONFIG[$key])) {
65
+									return false;
66
+				}
66 67
 				return $CONFIG[$key];
67 68
 				break;
68 69
 			default:
Please login to merge, or discard this patch.
include/Webservices/VtigerActorOperation.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,8 +270,7 @@
 block discarded – undo
270 270
 			foreach ($moduleFields as $fieldName => $webserviceField) {
271 271
 				array_push($fields, $this->getDescribeFieldArray($webserviceField));
272 272
 			}
273
-			$label = ($app_strings[$this->meta->getObectIndexColumn()]) ? $app_strings[$this->meta->getObectIndexColumn()] :
274
-				$this->meta->getObectIndexColumn();
273
+			$label = ($app_strings[$this->meta->getObectIndexColumn()]) ? $app_strings[$this->meta->getObectIndexColumn()] : $this->meta->getObectIndexColumn();
275 274
 			$this->moduleFields = $fields;
276 275
 		}
277 276
 		return $this->moduleFields;
Please login to merge, or discard this patch.
include/Webservices/QueryRelated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 		if (!empty($filterClause)) {
72 72
 			$query .= " " . $filterClause;
73 73
 		}
74
-		$query.=";";
74
+		$query .= ";";
75 75
 		$relatedRecords = vtws_query($query, $user);
76 76
 	}
77 77
 
Please login to merge, or discard this patch.
include/Webservices/GetUpdates.php 1 patch
Braces   +25 added lines, -18 removed lines patch added patch discarded remove patch
@@ -73,14 +73,16 @@  discard block
 block discarded – undo
73 73
 	$modulesInformation = $modulesDetails["information"];
74 74
 
75 75
 	foreach ($modulesInformation as $moduleName => $entityInformation) {
76
-		if ($entityInformation["isEntity"])
77
-			$entityModules[] = $moduleName;
76
+		if ($entityInformation["isEntity"]) {
77
+					$entityModules[] = $moduleName;
78
+		}
78 79
 	}
79 80
 	if (!$typed) {
80 81
 		$accessableModules = $entityModules;
81 82
 	} else {
82
-		if (!in_array($elementType, $entityModules))
83
-			throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED, "Permission to perform the operation is denied");
83
+		if (!in_array($elementType, $entityModules)) {
84
+					throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED, "Permission to perform the operation is denied");
85
+		}
84 86
 		$accessableModules[] = $elementType;
85 87
 	}
86 88
 
@@ -101,15 +103,17 @@  discard block
 block discarded – undo
101 103
 		if ($elementType == "Calendar" || $elementType == "Events") {
102 104
 			$baseCRMTable = getSyncQueryBaseTable($elementType);
103 105
 		}
104
-	} else
105
-		$baseCRMTable = " vtiger_crmentity ";
106
+	} else {
107
+			$baseCRMTable = " vtiger_crmentity ";
108
+	}
106 109
 
107 110
 	//modifiedtime - next token
108 111
 	$q = "SELECT modifiedtime FROM $baseCRMTable WHERE  modifiedtime>? and setype IN(" . generateQuestionMarks($accessableModules) . ") ";
109 112
 	$params = array($datetime);
110 113
 	foreach ($accessableModules as $entityModule) {
111
-		if ($entityModule == "Events")
112
-			$entityModule = "Calendar";
114
+		if ($entityModule == "Events") {
115
+					$entityModule = "Calendar";
116
+		}
113 117
 		$params[] = $entityModule;
114 118
 	}
115 119
 	if (!$applicationSync) {
@@ -159,10 +163,11 @@  discard block
 block discarded – undo
159 163
 				$selectClause .=", " . $table_fieldName;
160 164
 			}
161 165
 		}
162
-		if ($elementType == "Emails")
163
-			$fromClause = vtws_getEmailFromClause();
164
-		else
165
-			$fromClause = $queryGenerator->getFromClause();
166
+		if ($elementType == "Emails") {
167
+					$fromClause = vtws_getEmailFromClause();
168
+		} else {
169
+					$fromClause = $queryGenerator->getFromClause();
170
+		}
166 171
 
167 172
 		$fromClause .= " INNER JOIN (select modifiedtime, crmid,deleted,setype FROM $baseCRMTable WHERE setype=? and modifiedtime >? and modifiedtime<=?";
168 173
 		if (!$applicationSync) {
@@ -201,8 +206,9 @@  discard block
 block discarded – undo
201 206
 	$params = array($maxModifiedTime);
202 207
 
203 208
 	foreach ($accessableModules as $entityModule) {
204
-		if ($entityModule == "Events")
205
-			$entityModule = "Calendar";
209
+		if ($entityModule == "Events") {
210
+					$entityModule = "Calendar";
211
+		}
206 212
 		$params[] = $entityModule;
207 213
 	}
208 214
 	if (!$applicationSync) {
@@ -285,10 +291,11 @@  discard block
 block discarded – undo
285 291
 
286 292
 function getCalendarTypeCondition($elementType)
287 293
 {
288
-	if ($elementType == "Events")
289
-		$activityCondition = "vtiger_activity.activitytype !='Task' and vtiger_activity.activitytype !='Emails'";
290
-	else
291
-		$activityCondition = "vtiger_activity.activitytype ='Task'";
294
+	if ($elementType == "Events") {
295
+			$activityCondition = "vtiger_activity.activitytype !='Task' and vtiger_activity.activitytype !='Emails'";
296
+	} else {
297
+			$activityCondition = "vtiger_activity.activitytype ='Task'";
298
+	}
292 299
 	return $activityCondition;
293 300
 }
294 301
 
Please login to merge, or discard this patch.
include/Webservices/VtigerCRMObjectMeta.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,8 +212,9 @@  discard block
 block discarded – undo
212 212
 		$adb = PearDatabase::getInstance();
213 213
 
214 214
 		// administrator's have assign privilege
215
-		if (\vtlib\Functions::userIsAdministrator($this->user))
216
-			return true;
215
+		if (\vtlib\Functions::userIsAdministrator($this->user)) {
216
+					return true;
217
+		}
217 218
 
218 219
 		$idComponents = vtws_getIdComponents($webserviceId);
219 220
 		$userId = $idComponents[1];
@@ -353,8 +354,9 @@  discard block
 block discarded – undo
353 354
 		$theme = vtws_preserveGlobal('theme', $this->user->theme);
354 355
 		$default_language = AppConfig::main('default_language');
355 356
 		$current_language = vglobal('current_language');
356
-		if (empty($current_language))
357
-			$current_language = $default_language;
357
+		if (empty($current_language)) {
358
+					$current_language = $default_language;
359
+		}
358 360
 		$current_language = vtws_preserveGlobal('current_language', $current_language);
359 361
 
360 362
 		$this->computeAccess();
Please login to merge, or discard this patch.
include/Webservices/VTQL_Parser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 {
90 90
 
91 91
 	public $stateno; /* The state-number */
92
-	public $major;   /* The major token value.  This is the code
92
+	public $major; /* The major token value.  This is the code
93 93
 	 * * number for the token at this stack level */
94 94
 	public $minor; /* The user-supplied minor token value.  This
95 95
 	 * * is the value of the token  */
@@ -663,17 +663,17 @@  discard block
 block discarded – undo
663 663
 	/**
664 664
 	 * @var int
665 665
 	 */
666
-	public $yyidx;  /* Index of top element in stack */
666
+	public $yyidx; /* Index of top element in stack */
667 667
 
668 668
 	/**
669 669
 	 * @var int
670 670
 	 */
671
-	public $yyerrcnt;  /* Shifts left before out of the error */
671
+	public $yyerrcnt; /* Shifts left before out of the error */
672 672
 
673 673
 	/**
674 674
 	 * @var array
675 675
 	 */
676
-	public $yystack = [];  /* The parser's stack */
676
+	public $yystack = []; /* The parser's stack */
677 677
 
678 678
 	/**
679 679
 	 * For tracing shifts, the names of all terminals and nonterminals
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
 			 * * which appear on the RHS of the rule, but which are not used
783 783
 			 * * inside the C code.
784 784
 			 */
785
-			default: break;   /* If no destructor action specified: do nothing */
785
+			default: break; /* If no destructor action specified: do nothing */
786 786
 		}
787 787
 	}
788 788
 
@@ -1608,7 +1608,7 @@  discard block
 block discarded – undo
1608 1608
 	{
1609 1609
 //        $yyact;            /* The parser action. */
1610 1610
 //        $yyendofinput;     /* True if we are at the end of input */
1611
-		$yyerrorhit = 0;   /* True if yymajor has invoked an error */
1611
+		$yyerrorhit = 0; /* True if yymajor has invoked an error */
1612 1612
 
1613 1613
 		/* (re)initialize the parser, if necessary */
1614 1614
 		if ($this->yyidx === null || $this->yyidx < 0) {
Please login to merge, or discard this patch.
include/Webservices/History.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	$page = empty($element['page']) ? 0 : intval($element['page']); // Page to start
32 32
 
33 33
 	$acrossAllModule = false;
34
-	if ($moduleName == 'Home')
35
-		$acrossAllModule = true;
34
+	if ($moduleName == 'Home') {
35
+			$acrossAllModule = true;
36
+	}
36 37
 
37 38
 	// Pre-condition check
38 39
 	if (empty($moduleName)) {
@@ -71,8 +72,10 @@  discard block
 block discarded – undo
71 72
 
72 73
 	// Get most recently tracked changes with limit
73 74
 	$start = $page * $MAXLIMIT;
74
-	if ($start > 0)
75
-		$start = $start + 1; // Adjust the start range
75
+	if ($start > 0) {
76
+			$start = $start + 1;
77
+	}
78
+	// Adjust the start range
76 79
 	$sql .= sprintf(' ORDER BY vtiger_modtracker_basic.id DESC LIMIT %s,%s', $start, $MAXLIMIT);
77 80
 
78 81
 	$result = $adb->pquery($sql, $params);
Please login to merge, or discard this patch.
include/Webservices/ModuleTypes.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 				generateQuestionMarks($fieldTypeList) . ')';
53 53
 			$params = [];
54 54
 			$params[] = $user->id;
55
-			foreach ($fieldTypeList as $fieldType)
56
-				$params[] = $fieldType;
55
+			foreach ($fieldTypeList as $fieldType) {
56
+							$params[] = $fieldType;
57
+			}
57 58
 			$result = $db->pquery($sql, $params);
58 59
 			$it = new SqlResultIterator($db, $result);
59 60
 			$moduleList = [];
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
 
108 109
 	$default_language = VTWS_PreserveGlobal::getGlobal('default_language');
109 110
 	$current_language = vglobal('current_language');
110
-	if (empty($current_language))
111
-		$current_language = $default_language;
111
+	if (empty($current_language)) {
112
+			$current_language = $default_language;
113
+	}
112 114
 	$current_language = vtws_preserveGlobal('current_language', $current_language);
113 115
 
114 116
 	$appStrings = return_application_language($current_language);
Please login to merge, or discard this patch.
include/Webservices/DataTransform.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@  discard block
 block discarded – undo
24 24
 		$fieldColumnMapping = $meta->getFieldColumnMapping();
25 25
 		$columnFieldMapping = array_flip($fieldColumnMapping);
26 26
 		foreach ($row as $col => $val) {
27
-			if (array_key_exists($col, $columnFieldMapping))
28
-				$newRow[$columnFieldMapping[$col]] = $val;
27
+			if (array_key_exists($col, $columnFieldMapping)) {
28
+							$newRow[$columnFieldMapping[$col]] = $val;
29
+			}
29 30
 		}
30 31
 		$newRow = DataTransform::sanitizeData($newRow, $meta, true);
31 32
 		return $newRow;
@@ -149,8 +150,9 @@  discard block
 block discarded – undo
149 150
 		$allFields = $meta->getFieldColumnMapping();
150 151
 		$newRow = [];
151 152
 		foreach ($allFields as $field => $col) {
152
-			if (isset($row[$field]))
153
-				$newRow[$field] = $row[$field];
153
+			if (isset($row[$field])) {
154
+							$newRow[$field] = $row[$field];
155
+			}
154 156
 		}
155 157
 		if (isset($row[$recordString])) {
156 158
 			$newRow[$recordString] = $row[$recordString];
Please login to merge, or discard this patch.