Completed
Pull Request — developer (#4001)
by Thom
542:26 queued 508:45
created
modules/Vtiger/pdfs/mPDF.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -40,6 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 	/**
42 42
 	 * Sets library name
43
+	 * @param string $name
43 44
 	 */
44 45
 	public function setLibraryName($name)
45 46
 	{
@@ -56,6 +57,7 @@  discard block
 block discarded – undo
56 57
 
57 58
 	/**
58 59
 	 * Sets the template id
60
+	 * @param integer $id
59 61
 	 */
60 62
 	public function setTemplateId($id)
61 63
 	{
@@ -72,6 +74,7 @@  discard block
 block discarded – undo
72 74
 
73 75
 	/**
74 76
 	 * Sets the record id
77
+	 * @param integer $id
75 78
 	 */
76 79
 	public function setRecordId($id)
77 80
 	{
@@ -88,6 +91,7 @@  discard block
 block discarded – undo
88 91
 
89 92
 	/**
90 93
 	 * Sets module name
94
+	 * @param string $name
91 95
 	 */
92 96
 	public function setModuleName($name)
93 97
 	{
@@ -248,6 +252,7 @@  discard block
 block discarded – undo
248 252
 
249 253
 	/**
250 254
 	 * Set header content
255
+	 * @param string $name
251 256
 	 */
252 257
 	public function setHeader($name, $header)
253 258
 	{
@@ -257,6 +262,7 @@  discard block
 block discarded – undo
257 262
 
258 263
 	/**
259 264
 	 * Set footer content
265
+	 * @param string $name
260 266
 	 */
261 267
 	public function setFooter($name, $footer)
262 268
 	{
Please login to merge, or discard this patch.
modules/Vtiger/uitypes/Multiowner.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 	/**
24 24
 	 * Function to get the Display Value, for the current field type with given DB Insert Value
25
-	 * @param <Object> $value
25
+	 * @param <Object> $values
26 26
 	 * @return <Object>
27 27
 	 */
28 28
 	public function getDisplayValue($values, $record = false, $recordInstance = false, $rawText = false)
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
 	 */
28 28
 	public function getDisplayValue($values, $record = false, $recordInstance = false, $rawText = false)
29 29
 	{
30
-		if ($values === null && !is_array($values))
31
-			return;
30
+		if ($values === null && !is_array($values)) {
31
+					return;
32
+		}
32 33
 		foreach ($values as $value) {
33 34
 			if (self::getOwnerType($value) === 'User') {
34 35
 				$userModel = Users_Record_Model::getCleanInstance('Users');
Please login to merge, or discard this patch.
modules/Vtiger/uitypes/Tree.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@  discard block
 block discarded – undo
25 25
 
26 26
 	/**
27 27
 	 * Function to get the Display Value, for the current field type with given DB Insert Value
28
-	 * @param <Object> $value
29 28
 	 * @return <Object>
30 29
 	 */
31 30
 	public function getDisplayValue($tree, $record = false, $recordInstance = false, $rawText = false)
@@ -77,7 +76,6 @@  discard block
 block discarded – undo
77 76
 
78 77
 	/**
79 78
 	 * Function to get the all Values
80
-	 * @param <Object> $value
81 79
 	 * @return <Object>
82 80
 	 */
83 81
 	public function getAllValue()
Please login to merge, or discard this patch.
modules/WSAPP/api/ws/Register.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -9,6 +9,9 @@
 block discarded – undo
9 9
  * *********************************************************************************** */
10 10
 require_once 'modules/WSAPP/SyncServer.php';
11 11
 
12
+/**
13
+ * @param string $type
14
+ */
12 15
 function wsapp_register($type, $syncType, $user)
13 16
 {
14 17
 	$instance = new SyncServer();
Please login to merge, or discard this patch.
modules/WSAPP/synclib/connectors/BaseConnector.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@
 block discarded – undo
56 56
 		return $this->syncController;
57 57
 	}
58 58
 
59
+	/**
60
+	 * @param WSAPP_SynchronizeController $syncController
61
+	 */
59 62
 	public function setSynchronizeController($syncController)
60 63
 	{
61 64
 		$this->syncController = $syncController;
Please login to merge, or discard this patch.
modules/WSAPP/synclib/controllers/SynchronizeController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@
 block discarded – undo
63 63
 		return new WSAPP_VtigerModel($data);
64 64
 	}
65 65
 
66
+	/**
67
+	 * @return WSAPP_SyncStateModel
68
+	 */
66 69
 	public function getSyncStateModel($connector)
67 70
 	{
68 71
 		return $connector->getSyncState($this->getSourceType())->setType($this->getSourceType());
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -150,15 +150,19 @@
 block discarded – undo
150 150
 	{
151 151
 		$records = array();
152 152
 		if ($pullTargetFirst) {
153
-			if ($push)
154
-				$records['push'] = $this->synchronizePush();
155
-			if ($pull)
156
-				$records['pull'] = $this->synchronizePull();
153
+			if ($push) {
154
+							$records['push'] = $this->synchronizePush();
155
+			}
156
+			if ($pull) {
157
+							$records['pull'] = $this->synchronizePull();
158
+			}
157 159
 		} else {
158
-			if ($pull)
159
-				$records['pull'] = $this->synchronizePull();
160
-			if ($push)
161
-				$records['push'] = $this->synchronizePush();
160
+			if ($pull) {
161
+							$records['pull'] = $this->synchronizePull();
162
+			}
163
+			if ($push) {
164
+							$records['push'] = $this->synchronizePush();
165
+			}
162 166
 		}
163 167
 		return $records;
164 168
 	}
Please login to merge, or discard this patch.
modules/WSAPP/synclib/models/BaseModel.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -29,12 +29,18 @@
 block discarded – undo
29 29
 		return $this;
30 30
 	}
31 31
 
32
+	/**
33
+	 * @param string $key
34
+	 */
32 35
 	public function set($key, $value)
33 36
 	{
34 37
 		$this->data[$key] = $value;
35 38
 		return $this;
36 39
 	}
37 40
 
41
+	/**
42
+	 * @param string $key
43
+	 */
38 44
 	public function get($key)
39 45
 	{
40 46
 		return $this->data[$key];
Please login to merge, or discard this patch.
vtlib/thirdparty/dUnzip2.inc.php 3 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -280,6 +280,10 @@  discard block
 block discarded – undo
280 280
 	}
281 281
 
282 282
 	// Private (you should NOT call these methods):
283
+
284
+	/**
285
+	 * @param string $content
286
+	 */
283 287
 	public function uncompress($content, $mode, $uncompressedSize, $targetFileName = false)
284 288
 	{
285 289
 		switch ($mode) {
@@ -328,6 +332,9 @@  discard block
 block discarded – undo
328 332
 		}
329 333
 	}
330 334
 
335
+	/**
336
+	 * @param integer $level
337
+	 */
331 338
 	public function debugMsg($level, $string)
332 339
 	{
333 340
 		if ($this->debug)
Please login to merge, or discard this patch.
Braces   +55 added lines, -38 removed lines patch added patch discarded remove patch
@@ -128,16 +128,18 @@  discard block
 block discarded – undo
128 128
 			foreach ($this->compressedList as $fileName => $item) {
129 129
 				if (!$kkk && $kkk = 1) {
130 130
 					echo "<tr style='background: #ADA'>";
131
-					foreach ($item as $fieldName => $value)
132
-						echo "<td>$fieldName</td>";
131
+					foreach ($item as $fieldName => $value) {
132
+											echo "<td>$fieldName</td>";
133
+					}
133 134
 					echo '</tr>';
134 135
 				}
135 136
 				echo "<tr style='background: #CFC'>";
136 137
 				foreach ($item as $fieldName => $value) {
137
-					if ($fieldName == 'lastmod_datetime')
138
-						echo "<td title='$fieldName' nowrap='nowrap'>" . date("d/m/Y H:i:s", $value) . "</td>";
139
-					else
140
-						echo "<td title='$fieldName' nowrap='nowrap'>$value</td>";
138
+					if ($fieldName == 'lastmod_datetime') {
139
+											echo "<td title='$fieldName' nowrap='nowrap'>" . date("d/m/Y H:i:s", $value) . "</td>";
140
+					} else {
141
+											echo "<td title='$fieldName' nowrap='nowrap'>$value</td>";
142
+					}
141 143
 				}
142 144
 				echo "</tr>";
143 145
 			}
@@ -150,16 +152,18 @@  discard block
 block discarded – undo
150 152
 				foreach ($this->centralDirList as $fileName => $item) {
151 153
 					if (!$kkk && $kkk = 1) {
152 154
 						echo "<tr style='background: #AAD'>";
153
-						foreach ($item as $fieldName => $value)
154
-							echo "<td>$fieldName</td>";
155
+						foreach ($item as $fieldName => $value) {
156
+													echo "<td>$fieldName</td>";
157
+						}
155 158
 						echo '</tr>';
156 159
 					}
157 160
 					echo "<tr style='background: #CCF'>";
158 161
 					foreach ($item as $fieldName => $value) {
159
-						if ($fieldName == 'lastmod_datetime')
160
-							echo "<td title='$fieldName' nowrap='nowrap'>" . date("d/m/Y H:i:s", $value) . "</td>";
161
-						else
162
-							echo "<td title='$fieldName' nowrap='nowrap'>$value</td>";
162
+						if ($fieldName == 'lastmod_datetime') {
163
+													echo "<td title='$fieldName' nowrap='nowrap'>" . date("d/m/Y H:i:s", $value) . "</td>";
164
+						} else {
165
+													echo "<td title='$fieldName' nowrap='nowrap'>$value</td>";
166
+						}
163 167
 					}
164 168
 					echo "</tr>";
165 169
 				}
@@ -226,25 +230,29 @@  discard block
 block discarded – undo
226 230
 		$ret = $this->uncompress(
227 231
 			fread($this->fh, $fdetails['compressed_size']), $fdetails['compression_method'], $fdetails['uncompressed_size'], $targetFileName
228 232
 		);
229
-		if ($applyChmod && $targetFileName)
230
-			@chmod($targetFileName, $applyChmod == 0755 ? 0644 : $applyChmod);
233
+		if ($applyChmod && $targetFileName) {
234
+					@chmod($targetFileName, $applyChmod == 0755 ? 0644 : $applyChmod);
235
+		}
231 236
 
232 237
 		return $ret;
233 238
 	}
234 239
 
235 240
 	public function unzipAll($targetDir = false, $baseDir = "", $maintainStructure = true, $applyChmod = 0755)
236 241
 	{
237
-		if ($targetDir === false)
238
-			$targetDir = dirname(__FILE__) . "/";
242
+		if ($targetDir === false) {
243
+					$targetDir = dirname(__FILE__) . "/";
244
+		}
239 245
 
240 246
 		$lista = $this->getList();
241
-		if (sizeof($lista))
242
-			foreach ($lista as $fileName => $trash) {
247
+		if (sizeof($lista)) {
248
+					foreach ($lista as $fileName => $trash) {
243 249
 				$dirname = dirname($fileName);
250
+		}
244 251
 				$outDN = "$targetDir/$dirname";
245 252
 
246
-				if (substr($dirname, 0, strlen($baseDir)) != $baseDir)
247
-					continue;
253
+				if (substr($dirname, 0, strlen($baseDir)) != $baseDir) {
254
+									continue;
255
+				}
248 256
 
249 257
 				if (!is_dir($outDN) && $maintainStructure) {
250 258
 					$str = "";
@@ -254,13 +262,15 @@  discard block
 block discarded – undo
254 262
 						if (!is_dir("$targetDir/$str")) {
255 263
 							$this->debugMsg(1, "Creating folder: $targetDir/$str");
256 264
 							mkdir("$targetDir/$str");
257
-							if ($applyChmod)
258
-								chmod("$targetDir/$str", $applyChmod);
265
+							if ($applyChmod) {
266
+															chmod("$targetDir/$str", $applyChmod);
267
+							}
259 268
 						}
260 269
 					}
261 270
 				}
262
-				if (substr($fileName, -1, 1) == "/")
263
-					continue;
271
+				if (substr($fileName, -1, 1) == "/") {
272
+									continue;
273
+				}
264 274
 
265 275
 				$maintainStructure ?
266 276
 						$this->unzip($fileName, "$targetDir/$fileName", $applyChmod) :
@@ -270,8 +280,9 @@  discard block
 block discarded – undo
270 280
 
271 281
 	public function close()
272 282
 	{  // Free the file resource
273
-		if ($this->fh)
274
-			fclose($this->fh);
283
+		if ($this->fh) {
284
+					fclose($this->fh);
285
+		}
275 286
 	}
276 287
 
277 288
 	public function __destroy()
@@ -330,11 +341,13 @@  discard block
 block discarded – undo
330 341
 
331 342
 	public function debugMsg($level, $string)
332 343
 	{
333
-		if ($this->debug)
334
-			if ($level == 1)
344
+		if ($this->debug) {
345
+					if ($level == 1)
335 346
 				echo "<b style='color: #777'>dUnzip2:</b> $string<br>";
336
-		if ($level == 2)
337
-			echo "<b style='color: #F00'>dUnzip2:</b> $string<br>";
347
+		}
348
+		if ($level == 2) {
349
+					echo "<b style='color: #F00'>dUnzip2:</b> $string<br>";
350
+		}
338 351
 	}
339 352
 
340 353
 	public function _loadFileListByEOF(&$fh, $stopOnFile = false)
@@ -427,9 +440,10 @@  discard block
 block discarded – undo
427 440
 				}
428 441
 
429 442
 				// If loaded centralDirs, then try to identify the offsetPosition of the compressed data.
430
-				if ($this->centralDirList)
431
-					foreach ($this->centralDirList as $filename => $details) {
443
+				if ($this->centralDirList) {
444
+									foreach ($this->centralDirList as $filename => $details) {
432 445
 						$i = $this->_getFileHeaderInformation($fh, $details['relative_offset']);
446
+				}
433 447
 						$this->compressedList[$filename]['file_name'] = $filename;
434 448
 						$this->compressedList[$filename]['compression_method'] = $details['compression_method'];
435 449
 						$this->compressedList[$filename]['version_needed'] = $details['version_needed'];
@@ -440,8 +454,9 @@  discard block
 block discarded – undo
440 454
 						$this->compressedList[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];
441 455
 						$this->compressedList[$filename]['extra_field'] = $i['extra_field'];
442 456
 						$this->compressedList[$filename]['contents-startOffset'] = $i['contents-startOffset'];
443
-						if (strtolower($stopOnFile) == strtolower($filename))
444
-							break;
457
+						if (strtolower($stopOnFile) == strtolower($filename)) {
458
+													break;
459
+						}
445 460
 					}
446 461
 				return true;
447 462
 			}
@@ -468,8 +483,9 @@  discard block
 block discarded – undo
468 483
 			$filename = $details['file_name'];
469 484
 			$this->compressedList[$filename] = $details;
470 485
 			$return = true;
471
-			if (strtolower($stopOnFile) == strtolower($filename))
472
-				break;
486
+			if (strtolower($stopOnFile) == strtolower($filename)) {
487
+							break;
488
+			}
473 489
 		}
474 490
 
475 491
 		return $return;
@@ -477,8 +493,9 @@  discard block
 block discarded – undo
477 493
 
478 494
 	public function _getFileHeaderInformation(&$fh, $startOffset = false)
479 495
 	{
480
-		if ($startOffset !== false)
481
-			fseek($fh, $startOffset);
496
+		if ($startOffset !== false) {
497
+					fseek($fh, $startOffset);
498
+		}
482 499
 
483 500
 		$signature = fread($fh, 4);
484 501
 		if ($signature == $this->zipSignature) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -18 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	public $fileName;
81 81
 	public $compressedList; // You will problably use only this one!
82 82
 	public $centralDirList; // Central dir list... It's a kind of 'extra attributes' for a set of files
83
-	public $endOfCentral;   // End of central dir, contains ZIP Comments
83
+	public $endOfCentral; // End of central dir, contains ZIP Comments
84 84
 	public $debug;
85 85
 	// Private
86 86
 	public $fh;
@@ -188,15 +188,13 @@  discard block
 block discarded – undo
188 188
 	{
189 189
 		return
190 190
 			isset($this->centralDirList[$compressedFileName]) ?
191
-			$this->centralDirList[$compressedFileName] :
192
-			false;
191
+			$this->centralDirList[$compressedFileName] : false;
193 192
 	}
194 193
 
195 194
 	public function getZipInfo($detail = false)
196 195
 	{
197 196
 		return $detail ?
198
-			$this->endOfCentral[$detail] :
199
-			$this->endOfCentral;
197
+			$this->endOfCentral[$detail] : $this->endOfCentral;
200 198
 	}
201 199
 
202 200
 	public function unzip($compressedFileName, $targetFileName = false, $applyChmod = 0644)
@@ -218,8 +216,7 @@  discard block
 block discarded – undo
218 216
 		if (!$fdetails['uncompressed_size']) {
219 217
 			$this->debugMsg(1, "File '<b>$compressedFileName</b>' is empty.");
220 218
 			return $targetFileName ?
221
-				file_put_contents($targetFileName, "") :
222
-				"";
219
+				file_put_contents($targetFileName, "") : "";
223 220
 		}
224 221
 
225 222
 		fseek($this->fh, $fdetails['contents-startOffset']);
@@ -263,8 +260,7 @@  discard block
 block discarded – undo
263 260
 					continue;
264 261
 
265 262
 				$maintainStructure ?
266
-						$this->unzip($fileName, "$targetDir/$fileName", $applyChmod) :
267
-						$this->unzip($fileName, "$targetDir/" . basename($fileName), $applyChmod);
263
+						$this->unzip($fileName, "$targetDir/$fileName", $applyChmod) : $this->unzip($fileName, "$targetDir/" . basename($fileName), $applyChmod);
268 264
 			}
269 265
 	}
270 266
 
@@ -286,8 +282,7 @@  discard block
 block discarded – undo
286 282
 			case 0:
287 283
 				// Not compressed
288 284
 				return $targetFileName ?
289
-					file_put_contents($targetFileName, $content) :
290
-					$content;
285
+					file_put_contents($targetFileName, $content) : $content;
291 286
 			case 1:
292 287
 				$this->debugMsg(2, "Shrunk mode is not supported... yet?");
293 288
 				return false;
@@ -306,8 +301,7 @@  discard block
 block discarded – undo
306 301
 			case 8:
307 302
 				// Deflate
308 303
 				return $targetFileName ?
309
-					file_put_contents($targetFileName, gzinflate($content, $uncompressedSize)) :
310
-					gzinflate($content, $uncompressedSize);
304
+					file_put_contents($targetFileName, gzinflate($content, $uncompressedSize)) : gzinflate($content, $uncompressedSize);
311 305
 			case 9:
312 306
 				$this->debugMsg(2, "Enhanced Deflating is not supported... yet?");
313 307
 				return false;
@@ -317,8 +311,7 @@  discard block
 block discarded – undo
317 311
 			case 12:
318 312
 				// Bzip2
319 313
 				return $targetFileName ?
320
-					file_put_contents($targetFileName, bzdecompress($content)) :
321
-					bzdecompress($content);
314
+					file_put_contents($targetFileName, bzdecompress($content)) : bzdecompress($content);
322 315
 			case 18:
323 316
 				$this->debugMsg(2, "IBM TERSE is not supported... yet?");
324 317
 				return false;
@@ -378,7 +371,7 @@  discard block
 block discarded – undo
378 371
 					$dir['compression_method'] = unpack("v", fread($fh, 2)); // compression method
379 372
 					$dir['lastmod_time'] = unpack("v", fread($fh, 2)); // last mod file time
380 373
 					$dir['lastmod_date'] = unpack("v", fread($fh, 2)); // last mod file date
381
-					$dir['crc-32'] = fread($fh, 4);  // crc-32
374
+					$dir['crc-32'] = fread($fh, 4); // crc-32
382 375
 					$dir['compressed_size'] = unpack("V", fread($fh, 4)); // compressed size
383 376
 					$dir['uncompressed_size'] = unpack("V", fread($fh, 4)); // uncompressed size
384 377
 					$fileNameLength = unpack("v", fread($fh, 2)); // filename length
@@ -389,7 +382,7 @@  discard block
 block discarded – undo
389 382
 					$dir['external_attributes1'] = unpack("v", fread($fh, 2)); // external file attributes-byte2
390 383
 					$dir['external_attributes2'] = unpack("v", fread($fh, 2)); // external file attributes
391 384
 					$dir['relative_offset'] = unpack("V", fread($fh, 4)); // relative offset of local header
392
-					$dir['file_name'] = fread($fh, $fileNameLength[1]);  // filename
385
+					$dir['file_name'] = fread($fh, $fileNameLength[1]); // filename
393 386
 					$dir['extra_field'] = $extraFieldLength[1] ? fread($fh, $extraFieldLength[1]) : ''; // extra field
394 387
 					$dir['file_comment'] = $fileCommentLength[1] ? fread($fh, $fileCommentLength[1]) : ''; // file comment			
395 388
 					// Convert the date and time, from MS-DOS format to UNIX Timestamp
@@ -489,7 +482,7 @@  discard block
 block discarded – undo
489 482
 			$file['compression_method'] = unpack("v", fread($fh, 2)); // compression method
490 483
 			$file['lastmod_time'] = unpack("v", fread($fh, 2)); // last mod file time
491 484
 			$file['lastmod_date'] = unpack("v", fread($fh, 2)); // last mod file date
492
-			$file['crc-32'] = fread($fh, 4);  // crc-32
485
+			$file['crc-32'] = fread($fh, 4); // crc-32
493 486
 			$file['compressed_size'] = unpack("V", fread($fh, 4)); // compressed size
494 487
 			$file['uncompressed_size'] = unpack("V", fread($fh, 4)); // uncompressed size
495 488
 			$fileNameLength = unpack("v", fread($fh, 2)); // filename length
Please login to merge, or discard this patch.
user_privileges/sharedOwner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php
2
-$map=[];
3 2
\ No newline at end of file
3
+$map = [];
4 4
\ No newline at end of file
Please login to merge, or discard this patch.