Completed
Push — developer ( f9e515...68a04b )
by Błażej
506:11 queued 468:51
created
modules/Vtiger/models/ListView.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -332,7 +332,6 @@
 block discarded – undo
332 332
 
333 333
 	/**
334 334
 	 * Function to get the list view entries
335
-	 * @param Vtiger_Paging_Model $pagingModel
336 335
 	 * @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
337 336
 	 */
338 337
 	public function getListViewCount()
Please login to merge, or discard this patch.
modules/Vtiger/models/ModuleMeta.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
 	/**
44 44
 	 * Functions returns webservices meta object
45
-	 * @return webservices meta
45
+	 * @return boolean meta
46 46
 	 */
47 47
 	public function getMeta()
48 48
 	{
Please login to merge, or discard this patch.
modules/Vtiger/views/Detail.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -302,6 +302,9 @@
 block discarded – undo
302 302
 		return $viewer->view('DetailViewFullContents.tpl', $moduleName, true);
303 303
 	}
304 304
 
305
+	/**
306
+	 * @param Vtiger_Request $request
307
+	 */
305 308
 	public function showModuleSummaryView($request)
306 309
 	{
307 310
 		$recordId = $request->get('record');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -686,8 +686,9 @@
 block discarded – undo
686 686
 			$sortImage = 'glyphicon glyphicon-chevron-up';
687 687
 		}
688 688
 		if (empty($orderBy) && empty($sortOrder)) {
689
-			if (is_numeric($relatedModuleName))
690
-				$relatedModuleName = vtlib\Functions::getModuleName($relatedModuleName);
689
+			if (is_numeric($relatedModuleName)) {
690
+							$relatedModuleName = vtlib\Functions::getModuleName($relatedModuleName);
691
+			}
691 692
 			$relatedInstance = CRMEntity::getInstance($relatedModuleName);
692 693
 			$orderBy = $relatedInstance->default_order_by;
693 694
 			$sortOrder = $relatedInstance->default_sort_order;
Please login to merge, or discard this patch.
modules/WSAPP/SyncServer.php 2 patches
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@  discard block
 block discarded – undo
81 81
 		return $mapping;
82 82
 	}
83 83
 
84
+	/**
85
+	 * @param string $flag
86
+	 */
84 87
 	public function idmap_storeRecordsInQueue($syncServerId, $recordDetails, $flag, $appid)
85 88
 	{
86 89
 		if (!is_array($recordDetails))
@@ -182,7 +185,7 @@  discard block
 block discarded – undo
182 185
 	 * @param <type> $appid
183 186
 	 * @param <type> $serverid
184 187
 	 * @param <type> $clientid
185
-	 * @param <type> $modifiedTime
188
+	 * @param <type> $clientModifiedTime
186 189
 	 * update the mapping of server and client id
187 190
 	 */
188 191
 	public function idmap_update($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId)
@@ -499,6 +502,9 @@  discard block
 block discarded – undo
499 502
 		return $serverIds;
500 503
 	}
501 504
 
505
+	/**
506
+	 * @param string $flag
507
+	 */
502 508
 	public function convertToQueueRecordFormat($record, $flag)
503 509
 	{
504 510
 		if ($flag != $this->delete)
Please login to merge, or discard this patch.
Braces   +53 added lines, -40 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	{
32 32
 		$db = PearDatabase::getInstance();
33 33
 		$appidresult = $db->pquery("SELECT appid FROM vtiger_wsapp WHERE appkey=?", array($key));
34
-		if ($db->num_rows($appidresult))
35
-			return $db->query_result($appidresult, 0, 'appid');
34
+		if ($db->num_rows($appidresult)) {
35
+					return $db->query_result($appidresult, 0, 'appid');
36
+		}
36 37
 		return false;
37 38
 	}
38 39
 
@@ -42,8 +43,9 @@  discard block
 block discarded – undo
42 43
 	 */
43 44
 	public function idmap_get_clientmap($appid, $serverids)
44 45
 	{
45
-		if (!is_array($serverids))
46
-			$serverids = array($serverids);
46
+		if (!is_array($serverids)) {
47
+					$serverids = array($serverids);
48
+		}
47 49
 		$db = PearDatabase::getInstance();
48 50
 		;
49 51
 		$result = $db->pquery(sprintf(
@@ -65,8 +67,9 @@  discard block
 block discarded – undo
65 67
 	 */
66 68
 	public function idmap_get_clientservermap($appid, $clientids)
67 69
 	{
68
-		if (!is_array($clientids))
69
-			$clientids = array($clientids);
70
+		if (!is_array($clientids)) {
71
+					$clientids = array($clientids);
72
+		}
70 73
 
71 74
 		$db = PearDatabase::getInstance();
72 75
 
@@ -83,8 +86,9 @@  discard block
 block discarded – undo
83 86
 
84 87
 	public function idmap_storeRecordsInQueue($syncServerId, $recordDetails, $flag, $appid)
85 88
 	{
86
-		if (!is_array($recordDetails))
87
-			$recordDetails = array($recordDetails);
89
+		if (!is_array($recordDetails)) {
90
+					$recordDetails = array($recordDetails);
91
+		}
88 92
 		$db = PearDatabase::getInstance();
89 93
 		$params = array();
90 94
 		$params[] = $syncServerId;
@@ -99,8 +103,9 @@  discard block
 block discarded – undo
99 103
 		$db = PearDatabase::getInstance();
100 104
 		$checkQuery = "SELECT syncserverid FROM vtiger_wsapp_queuerecords WHERE syncserverid=?";
101 105
 		$result = $db->pquery($checkQuery, array($syncServerId));
102
-		if ($db->num_rows($result) > 0)
103
-			return true;
106
+		if ($db->num_rows($result) > 0) {
107
+					return true;
108
+		}
104 109
 		return false;
105 110
 	}
106 111
 
@@ -148,19 +153,20 @@  discard block
 block discarded – undo
148 153
 	public function idmap_put($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId, $mode = "save")
149 154
 	{
150 155
 		$db = PearDatabase::getInstance();
151
-		if ($mode == $this->create)
152
-			$this->idmap_create($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
153
-		else if ($mode == $this->update)
154
-			$this->idmap_update($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
155
-		else if ($mode == $this->save) {
156
+		if ($mode == $this->create) {
157
+					$this->idmap_create($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
158
+		} else if ($mode == $this->update) {
159
+					$this->idmap_update($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
160
+		} else if ($mode == $this->save) {
156 161
 			$result = $db->pquery("SELECT * FROM vtiger_wsapp_recordmapping WHERE appid=? and serverid=? and clientid=?", array($appid, $serverid, $clientid));
157
-			if ($db->num_rows($result) <= 0)
158
-				$this->idmap_create($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
159
-			else
160
-				$this->idmap_update($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
162
+			if ($db->num_rows($result) <= 0) {
163
+							$this->idmap_create($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
164
+			} else {
165
+							$this->idmap_update($appid, $serverid, $clientid, $clientModifiedTime, $serverModifiedTime, $serverAppId);
166
+			}
167
+		} else if ($mode == $this->delete) {
168
+					$this->idmap_delete($appid, $serverid, $clientid, $serverAppId);
161 169
 		}
162
-		else if ($mode == $this->delete)
163
-			$this->idmap_delete($appid, $serverid, $clientid, $serverAppId);
164 170
 	}
165 171
 
166 172
 	/**
@@ -229,11 +235,13 @@  discard block
 block discarded – undo
229 235
 		if (empty($type)) {
230 236
 			throw new WebServiceException('WSAPP06', "No sync type specified");
231 237
 		}
232
-		if (is_array($name))
233
-			throw new WebServiceException("WSAPP07", "type is in the wrong format");
238
+		if (is_array($name)) {
239
+					throw new WebServiceException("WSAPP07", "type is in the wrong format");
240
+		}
234 241
 		$type = strtolower($type);
235
-		if (!in_array($type, $this->syncTypes))
236
-			throw new WebServiceException('WSAPP05', "Wrong sync type specified");
242
+		if (!in_array($type, $this->syncTypes)) {
243
+					throw new WebServiceException('WSAPP05', "Wrong sync type specified");
244
+		}
237 245
 		$db = PearDatabase::getInstance();
238 246
 		$uid = uniqid();
239 247
 		$db->pquery("INSERT INTO vtiger_wsapp (name, appkey,type) VALUES(?,?,?)", array($name, $uid, $type));
@@ -267,10 +275,11 @@  discard block
 block discarded – undo
267 275
 			throw new WebServiceException('WSAPP04', "Access restricted to app");
268 276
 		}
269 277
 
270
-		if (!is_array($element))
271
-			$records = array($element);
272
-		else
273
-			$records = $element;
278
+		if (!is_array($element)) {
279
+					$records = array($element);
280
+		} else {
281
+					$records = $element;
282
+		}
274 283
 
275 284
 		//hardcoded since the destination handler will be vtigerCRM
276 285
 		$serverKey = wsapp_getAppKey("vtigerCRM");
@@ -293,13 +302,15 @@  discard block
 block discarded – undo
293 302
 			$clientRecordId = $record['id'];
294 303
 
295 304
 			// Missing client record id?
296
-			if (empty($clientRecordId))
297
-				continue;
305
+			if (empty($clientRecordId)) {
306
+							continue;
307
+			}
298 308
 
299 309
 			$lookupRecordId = false;
300 310
 			$lookupResult = $db->pquery("SELECT serverid,clientmodifiedtime FROM vtiger_wsapp_recordmapping WHERE appid=? && clientid=?", array($appid, $clientRecordId));
301
-			if ($db->num_rows($lookupResult))
302
-				$lookupRecordId = $db->query_result($lookupResult, 0, 'serverid');
311
+			if ($db->num_rows($lookupResult)) {
312
+							$lookupRecordId = $db->query_result($lookupResult, 0, 'serverid');
313
+			}
303 314
 			if (empty($lookupRecordId) && $record['mode'] != "delete") {
304 315
 				$createRecords[$clientRecordId] = $record['values'];
305 316
 				$createRecords[$clientRecordId]['module'] = $record['module'];
@@ -309,8 +320,9 @@  discard block
 block discarded – undo
309 320
 					$deleteRecords[$clientRecordId] = $lookupRecordId;
310 321
 				} else if (!(empty($lookupRecordId))) {
311 322
 					$clientLastModifiedTime = $db->query_result($lookupResult, 0, 'clientmodifiedtime');
312
-					if ($clientLastModifiedTime >= $record['values']['modifiedtime'])
313
-						continue;
323
+					if ($clientLastModifiedTime >= $record['values']['modifiedtime']) {
324
+											continue;
325
+					}
314 326
 					$record['values']['id'] = $lookupRecordId;
315 327
 					$updateRecords[$clientRecordId] = $record['values'];
316 328
 					$updateRecords[$clientRecordId]['module'] = $record['module'];
@@ -446,8 +458,9 @@  discard block
 block discarded – undo
446 458
 	 */
447 459
 	public function map($key, $element, $user)
448 460
 	{
449
-		if (empty($element))
450
-			return;
461
+		if (empty($element)) {
462
+					return;
463
+		}
451 464
 		$db = PearDatabase::getInstance();
452 465
 		$appid = $this->appid_with_key($key);
453 466
 		$createDetails = $element["create"];
@@ -501,9 +514,9 @@  discard block
 block discarded – undo
501 514
 
502 515
 	public function convertToQueueRecordFormat($record, $flag)
503 516
 	{
504
-		if ($flag != $this->delete)
505
-			return $record;
506
-		else {
517
+		if ($flag != $this->delete) {
518
+					return $record;
519
+		} else {
507 520
 			$recordFormat = array();
508 521
 			$recordFormat['id'] = $record['id'];
509 522
 			return $recordFormat;
Please login to merge, or discard this patch.
vtlib/tools/console.php 3 patches
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@  discard block
 block discarded – undo
32 32
 		
33 33
 	}
34 34
 
35
+	/**
36
+	 * @param boolean $interactive
37
+	 */
35 38
 	public function setArguments($args, $interactive)
36 39
 	{
37 40
 		$this->arguments = $args;
@@ -156,11 +159,18 @@  discard block
 block discarded – undo
156 159
 		} while (true);
157 160
 	}
158 161
 
162
+	/**
163
+	 * @return string
164
+	 */
159 165
 	protected function toAlphaNumeric($value)
160 166
 	{
161 167
 		return preg_replace("/[^a-zA-Z0-9_]/", "", $value);
162 168
 	}
163 169
 
170
+	/**
171
+	 * @param string $dir
172
+	 * @param string $file_pattern
173
+	 */
164 174
 	protected function findFiles($dir, $file_pattern, &$files)
165 175
 	{
166 176
 		$items = glob($dir . '/*', GLOB_NOSORT);
@@ -257,6 +267,9 @@  discard block
 block discarded – undo
257 267
 		echo "DONE.\n";
258 268
 	}
259 269
 
270
+	/**
271
+	 * @param string $name
272
+	 */
260 273
 	public function find($name)
261 274
 	{
262 275
 		return vtlib\Module::getInstance($name);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -401,7 +401,7 @@
 block discarded – undo
401 401
 					if (!file_exists($tplpath . $tplname)) {
402 402
 						$initialContent = "{* License Text *}\n";
403 403
 						// Enable debug to make it easy to implement.
404
-						$initialContent.= "{debug}{* REMOVE THIS LINE AFTER IMPLEMENTATION *}\n\n";
404
+						$initialContent .= "{debug}{* REMOVE THIS LINE AFTER IMPLEMENTATION *}\n\n";
405 405
 						file_put_contents($tplpath . $tplname, $initialContent);
406 406
 					}
407 407
 					file_put_contents($tplpath . $tplname, "{* $file *}\n", FILE_APPEND);
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,8 +116,9 @@  discard block
 block discarded – undo
116 116
 	protected function prompt($msg = '', $type = self::PROMPT_ANY)
117 117
 	{
118 118
 		do {
119
-			if ($msg)
120
-				echo $msg;
119
+			if ($msg) {
120
+							echo $msg;
121
+			}
121 122
 			$value = trim(fgets(STDIN));
122 123
 
123 124
 			if (!$value && $type == self::PROMPT_OPTIONAL) {
@@ -463,8 +464,9 @@  discard block
 block discarded – undo
463 464
 			$filename = basename($file, true);
464 465
 			$dir = substr($file, 0, strpos($file, $filename));
465 466
 			$dir = str_replace('languages/' . self::BASE_LANG_PREFIX, 'languages/' . $languageInformation['prefix'], $dir);
466
-			if (!file_exists($dir))
467
-				mkdir($dir);
467
+			if (!file_exists($dir)) {
468
+							mkdir($dir);
469
+			}
468 470
 
469 471
 			if (isset($languageInformation['prefix_value'])) {
470 472
 				$contents = file_get_contents($file);
Please login to merge, or discard this patch.
vtlib/Vtiger/FieldBasic.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -146,6 +146,7 @@
 block discarded – undo
146 146
 	/**
147 147
 	 * Create this field instance
148 148
 	 * @param vtlib\Block Instance of the block to use
149
+	 * @param boolean $blockInstance
149 150
 	 * @access private
150 151
 	 */
151 152
 	public function __create($blockInstance)
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -253,10 +253,11 @@
 block discarded – undo
253 253
 	 */
254 254
 	public function save($blockInstance = false)
255 255
 	{
256
-		if ($this->id)
257
-			$this->__update();
258
-		else
259
-			$this->__create($blockInstance);
256
+		if ($this->id) {
257
+					$this->__update();
258
+		} else {
259
+					$this->__create($blockInstance);
260
+		}
260 261
 		return $this->id;
261 262
 	}
262 263
 
Please login to merge, or discard this patch.
vtlib/Vtiger/Filter.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -56,6 +56,7 @@  discard block
 block discarded – undo
56 56
 	/**
57 57
 	 * Create this instance
58 58
 	 * @param Module Instance of the module to which this filter should be associated with
59
+	 * @param boolean $moduleInstance
59 60
 	 * @access private
60 61
 	 */
61 62
 	public function __create($moduleInstance)
@@ -312,6 +313,7 @@  discard block
 block discarded – undo
312 313
 	/**
313 314
 	 * Delete filter associated for module
314 315
 	 * @param Module Instance of module
316
+	 * @param ModuleBasic $moduleInstance
315 317
 	 */
316 318
 	static function deleteForModule($moduleInstance)
317 319
 	{
Please login to merge, or discard this patch.
Braces   +58 added lines, -50 removed lines patch added patch discarded remove patch
@@ -71,10 +71,14 @@  discard block
 block discarded – undo
71 71
 			$this->sequence = $result->rowCount() ? (int) $db->getSingleValue($result) + 1 : 0;
72 72
 		}
73 73
 		if (!isset($this->status)) {
74
-			if ($this->presence == 0)
75
-				$this->status = '0'; // Default
76
-			else
77
-				$this->status = '3'; // Public
74
+			if ($this->presence == 0) {
75
+							$this->status = '0';
76
+			}
77
+			// Default
78
+			else {
79
+							$this->status = '3';
80
+			}
81
+			// Public
78 82
 		}
79 83
 
80 84
 		$db->insert('vtiger_customview', [
@@ -122,10 +126,11 @@  discard block
 block discarded – undo
122 126
 	 */
123 127
 	public function save($moduleInstance = false)
124 128
 	{
125
-		if ($this->id)
126
-			$this->__update();
127
-		else
128
-			$this->__create($moduleInstance);
129
+		if ($this->id) {
130
+					$this->__update();
131
+		} else {
132
+					$this->__create($moduleInstance);
133
+		}
129 134
 		return $this->id;
130 135
 	}
131 136
 
@@ -181,8 +186,9 @@  discard block
 block discarded – undo
181 186
 	{
182 187
 		$adb = \PearDatabase::getInstance();
183 188
 
184
-		if (empty($comparator))
185
-			return $this;
189
+		if (empty($comparator)) {
190
+					return $this;
191
+		}
186 192
 
187 193
 		$comparator = self::translateComparator($comparator);
188 194
 		$cvcolvalue = $this->__getColumnValue($fieldInstance);
@@ -204,48 +210,50 @@  discard block
 block discarded – undo
204 210
 		$comparator = false;
205 211
 		if ($tolongform) {
206 212
 			$comparator = strtolower($value);
207
-			if ($comparator == 'e')
208
-				$comparator = 'EQUALS';
209
-			else if ($comparator == 'n')
210
-				$comparator = 'NOT_EQUALS';
211
-			else if ($comparator == 's')
212
-				$comparator = 'STARTS_WITH';
213
-			else if ($comparator == 'ew')
214
-				$comparator = 'ENDS_WITH';
215
-			else if ($comparator == 'c')
216
-				$comparator = 'CONTAINS';
217
-			else if ($comparator == 'k')
218
-				$comparator = 'DOES_NOT_CONTAINS';
219
-			else if ($comparator == 'l')
220
-				$comparator = 'LESS_THAN';
221
-			else if ($comparator == 'g')
222
-				$comparator = 'GREATER_THAN';
223
-			else if ($comparator == 'm')
224
-				$comparator = 'LESS_OR_EQUAL';
225
-			else if ($comparator == 'h')
226
-				$comparator = 'GREATER_OR_EQUAL';
213
+			if ($comparator == 'e') {
214
+							$comparator = 'EQUALS';
215
+			} else if ($comparator == 'n') {
216
+							$comparator = 'NOT_EQUALS';
217
+			} else if ($comparator == 's') {
218
+							$comparator = 'STARTS_WITH';
219
+			} else if ($comparator == 'ew') {
220
+							$comparator = 'ENDS_WITH';
221
+			} else if ($comparator == 'c') {
222
+							$comparator = 'CONTAINS';
223
+			} else if ($comparator == 'k') {
224
+							$comparator = 'DOES_NOT_CONTAINS';
225
+			} else if ($comparator == 'l') {
226
+							$comparator = 'LESS_THAN';
227
+			} else if ($comparator == 'g') {
228
+							$comparator = 'GREATER_THAN';
229
+			} else if ($comparator == 'm') {
230
+							$comparator = 'LESS_OR_EQUAL';
231
+			} else if ($comparator == 'h') {
232
+							$comparator = 'GREATER_OR_EQUAL';
233
+			}
227 234
 		} else {
228 235
 			$comparator = strtoupper($value);
229
-			if ($comparator == 'EQUALS')
230
-				$comparator = 'e';
231
-			else if ($comparator == 'NOT_EQUALS')
232
-				$comparator = 'n';
233
-			else if ($comparator == 'STARTS_WITH')
234
-				$comparator = 's';
235
-			else if ($comparator == 'ENDS_WITH')
236
-				$comparator = 'ew';
237
-			else if ($comparator == 'CONTAINS')
238
-				$comparator = 'c';
239
-			else if ($comparator == 'DOES_NOT_CONTAINS')
240
-				$comparator = 'k';
241
-			else if ($comparator == 'LESS_THAN')
242
-				$comparator = 'l';
243
-			else if ($comparator == 'GREATER_THAN')
244
-				$comparator = 'g';
245
-			else if ($comparator == 'LESS_OR_EQUAL')
246
-				$comparator = 'm';
247
-			else if ($comparator == 'GREATER_OR_EQUAL')
248
-				$comparator = 'h';
236
+			if ($comparator == 'EQUALS') {
237
+							$comparator = 'e';
238
+			} else if ($comparator == 'NOT_EQUALS') {
239
+							$comparator = 'n';
240
+			} else if ($comparator == 'STARTS_WITH') {
241
+							$comparator = 's';
242
+			} else if ($comparator == 'ENDS_WITH') {
243
+							$comparator = 'ew';
244
+			} else if ($comparator == 'CONTAINS') {
245
+							$comparator = 'c';
246
+			} else if ($comparator == 'DOES_NOT_CONTAINS') {
247
+							$comparator = 'k';
248
+			} else if ($comparator == 'LESS_THAN') {
249
+							$comparator = 'l';
250
+			} else if ($comparator == 'GREATER_THAN') {
251
+							$comparator = 'g';
252
+			} else if ($comparator == 'LESS_OR_EQUAL') {
253
+							$comparator = 'm';
254
+			} else if ($comparator == 'GREATER_OR_EQUAL') {
255
+							$comparator = 'h';
256
+			}
249 257
 		}
250 258
 		return $comparator;
251 259
 	}
Please login to merge, or discard this patch.
vtlib/Vtiger/Link.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -132,6 +132,7 @@  discard block
 block discarded – undo
132 132
 	/**
133 133
 	 * Delete all links related to module
134 134
 	 * @param Integer Module ID.
135
+	 * @param boolean $tabid
135 136
 	 */
136 137
 	static function deleteAll($tabid)
137 138
 	{
@@ -143,6 +144,7 @@  discard block
 block discarded – undo
143 144
 	/**
144 145
 	 * Get all the links related to module
145 146
 	 * @param Integer Module ID.
147
+	 * @param boolean $tabid
146 148
 	 */
147 149
 	static function getAll($tabid)
148 150
 	{
@@ -234,6 +236,7 @@  discard block
 block discarded – undo
234 236
 
235 237
 	/**
236 238
 	 * Extract the links of module for export.
239
+	 * @param boolean $tabid
237 240
 	 */
238 241
 	static function getAllForExport($tabid)
239 242
 	{
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,14 +196,16 @@
 block discarded – undo
196 196
 
197 197
 		$strtemplate = new \Vtiger_StringTemplate();
198 198
 		if ($parameters) {
199
-			foreach ($parameters as $key => $value)
200
-				$strtemplate->assign($key, $value);
199
+			foreach ($parameters as $key => $value) {
200
+							$strtemplate->assign($key, $value);
201
+			}
201 202
 		}
202 203
 
203 204
 		$instances = [];
204 205
 		if ($multitype) {
205
-			foreach ($type as $t)
206
-				$instances[$t] = [];
206
+			foreach ($type as $t) {
207
+							$instances[$t] = [];
208
+			}
207 209
 		}
208 210
 
209 211
 		while ($row = $adb->fetch_array($result)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
 				if ($tabid === self::IGNORE_MODULE) {
179 179
 					$permittedTabIdList = getPermittedModuleIdList();
180 180
 					if (!empty($permittedTabIdList) && !$currentUser->isAdminUser()) {
181
-						$permittedTabIdList [] = 0;  // Added to support one link for all modules
181
+						$permittedTabIdList [] = 0; // Added to support one link for all modules
182 182
 						foreach ($permittedTabIdList as $moduleId) {
183 183
 							foreach ($type as $typ) {
184 184
 								if (isset($rows[$moduleId][$typ])) {
Please login to merge, or discard this patch.
vtlib/Vtiger/LinkData.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
 	protected $user;
24 24
 	protected $module;
25 25
 
26
+	/**
27
+	 * @param Link $link
28
+	 */
26 29
 	public function __construct($link, $user, $input = null)
27 30
 	{
28 31
 		$this->link = $link;
Please login to merge, or discard this patch.