Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/AOS_PDF_Templates/PDF_Lib/classes/barcode.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -423,6 +423,7 @@  discard block
 block discarded – undo
423 423
 	
424 424
 	/**
425 425
 	 * Encode a string to be used for CODE 39 Extended mode.
426
+	 * @param string $code
426 427
 	 */
427 428
 	protected function encode_code39_ext($code) {
428 429
 		$encode = array(
@@ -618,6 +619,7 @@  discard block
 block discarded – undo
618 619
 	
619 620
 	/**
620 621
 	 * Calculate CODE 93 checksum (modulo 47).
622
+	 * @param string $code
621 623
 	 */
622 624
 	protected function checksum_code93($code) {
623 625
 		$chars = array(
@@ -778,6 +780,7 @@  discard block
 block discarded – undo
778 780
 	
779 781
 	/**
780 782
 	 * Convert binary barcode sequence to barcode array
783
+	 * @param string $seq
781 784
 	 */
782 785
 	protected function binseq_to_array($seq, $bararray) {
783 786
 		$len = strlen($seq);
@@ -1844,6 +1847,7 @@  discard block
 block discarded – undo
1844 1847
 	/**
1845 1848
 	 * Convert large integer number to hexadecimal representation.
1846 1849
 	 * (requires PHP bcmath extension) 
1850
+	 * @param string $number
1847 1851
 	 */
1848 1852
 	public function dec_to_hex($number) {
1849 1853
 		$i = 0;
@@ -1866,6 +1870,7 @@  discard block
 block discarded – undo
1866 1870
 	/**
1867 1871
 	 * Convert large hexadecimal number to decimal representation (string).
1868 1872
 	 * (requires PHP bcmath extension) 
1873
+	 * @param string $hex
1869 1874
 	 */
1870 1875
 	public function hex_to_dec($hex) {
1871 1876
 		$dec = 0;
@@ -1913,6 +1918,7 @@  discard block
 block discarded – undo
1913 1918
 	
1914 1919
 	/**
1915 1920
 	 * Reverse unsigned short value
1921
+	 * @param integer $num
1916 1922
 	 */
1917 1923
 	protected function imb_reverse_us($num) {
1918 1924
 		$rev = 0;
@@ -1926,6 +1932,8 @@  discard block
 block discarded – undo
1926 1932
 	
1927 1933
 	/**
1928 1934
 	 * generate Nof13 tables used for Intelligent Mail Barcode
1935
+	 * @param integer $n
1936
+	 * @param integer $size
1929 1937
 	 */
1930 1938
 	protected function imb_tables($n, $size) {
1931 1939
 		$table = array();
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/classes/bmp.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -142,11 +142,17 @@  discard block
 block discarded – undo
142 142
 		return $info;
143 143
 }
144 144
 
145
+/**
146
+ * @param string $s
147
+ */
145 148
 function _fourbytes2int_le($s) {
146 149
 	//Read a 4-byte integer from string
147 150
 	return (ord($s[3])<<24) + (ord($s[2])<<16) + (ord($s[1])<<8) + ord($s[0]);
148 151
 }
149 152
 
153
+/**
154
+ * @param string $s
155
+ */
150 156
 function _twobytes2int_le($s) {
151 157
 	//Read a 2-byte integer from string
152 158
 	return (ord(substr($s, 1, 1))<<8) + ord(substr($s, 0, 1));
@@ -155,6 +161,10 @@  discard block
 block discarded – undo
155 161
 
156 162
 # Decoder for RLE8 compression in windows bitmaps
157 163
 # see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp
164
+/**
165
+ * @param string $str
166
+ * @param integer $width
167
+ */
158 168
 function rle8_decode ($str, $width){
159 169
     $lineWidth = $width + (3 - ($width-1) % 4);
160 170
     $out = '';
@@ -192,6 +202,10 @@  discard block
 block discarded – undo
192 202
 
193 203
 # Decoder for RLE4 compression in windows bitmaps
194 204
 # see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp
205
+/**
206
+ * @param string $str
207
+ * @param integer $width
208
+ */
195 209
 function rle4_decode ($str, $width){
196 210
     $w = floor($width/2) + ($width % 2);
197 211
     $lineWidth = $w + (3 - ( ($width-1) / 2) % 4);    
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/classes/form.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -600,6 +600,9 @@  discard block
 block discarded – undo
600 600
 	}
601 601
 }
602 602
 
603
+/**
604
+ * @param string $js
605
+ */
603 606
 function SetFormChoiceJS( $name, $js ) {
604 607
 	$js = str_replace("\t",' ', trim($js) );
605 608
 	if ( isset($name) && isset($js) ) {
@@ -806,6 +809,9 @@  discard block
 block discarded – undo
806 809
 	}
807 810
 
808 811
 
812
+	/**
813
+	 * @param string $url
814
+	 */
809 815
 	function SetFormSubmit( $w, $h, $name, $value = 'Submit', $url, $title = '', $typ = 'html', $method = 'POST', $flags = array(), $background_col=false, $border_col=false, $noprint=false) {
810 816
 		if (!$name) { $name = 'Submit'; }
811 817
 		$this->SetFormButton( $w, $h, $name, $value, 'submit', $title, $flags, false, false, $background_col, $border_col, $noprint);
@@ -842,6 +848,9 @@  discard block
 block discarded – undo
842 848
 	}
843 849
 
844 850
 
851
+	/**
852
+	 * @param string $type
853
+	 */
845 854
 	function SetFormButton( $bb, $hh, $name, $value, $type, $title = '', $flags = array(), $checked=false, $disabled=false, $background_col=false, $border_col=false, $noprint=false ) {
846 855
 		$this->formn++;
847 856
 		if (!preg_match('/^[a-zA-Z0-9_:\-]+$/', $name)) {
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/classes/gif.php 1 patch
Doc Comments   +42 added lines patch added patch discarded remove patch
@@ -42,6 +42,10 @@  discard block
 block discarded – undo
42 42
 
43 43
 	///////////////////////////////////////////////////////////////////////////
44 44
 
45
+	/**
46
+	 * @param string $data
47
+	 * @param integer $datLen
48
+	 */
45 49
 	function deCompress($data, &$datLen)
46 50
 	{
47 51
 		$stLen  = strlen($data);
@@ -66,6 +70,10 @@  discard block
 block discarded – undo
66 70
 	}
67 71
 
68 72
 	///////////////////////////////////////////////////////////////////////////
73
+
74
+	/**
75
+	 * @param integer $dp
76
+	 */
69 77
 	function LZWCommandInit(&$data, &$dp)
70 78
 	{
71 79
 			$this->SetCodeSize = ord($data[0]);
@@ -94,6 +102,9 @@  discard block
 block discarded – undo
94 102
 			return 1;
95 103
 	}
96 104
 
105
+	/**
106
+	 * @return integer
107
+	 */
97 108
 	function LZWCommand(&$data, &$dp)
98 109
 	{
99 110
 		if($this->Fresh) {
@@ -179,6 +190,9 @@  discard block
 block discarded – undo
179 190
 
180 191
 	///////////////////////////////////////////////////////////////////////////
181 192
 
193
+	/**
194
+	 * @param integer $dp
195
+	 */
182 196
 	function GetCodeInit(&$data, &$dp)
183 197
 	{
184 198
 			$this->CurBit   = 0;
@@ -248,6 +262,10 @@  discard block
 block discarded – undo
248 262
 
249 263
 	///////////////////////////////////////////////////////////////////////////
250 264
 
265
+	/**
266
+	 * @param string $lpData
267
+	 * @param integer $num
268
+	 */
251 269
 	function load($lpData, $num)
252 270
 	{
253 271
 		$this->m_nColors  = 0;
@@ -343,6 +361,9 @@  discard block
 block discarded – undo
343 361
 
344 362
 	///////////////////////////////////////////////////////////////////////////
345 363
 
364
+	/**
365
+	 * @param integer $hdrLen
366
+	 */
346 367
 	function load($lpData, &$hdrLen)
347 368
 	{
348 369
 		$hdrLen = 0;
@@ -380,6 +401,9 @@  discard block
 block discarded – undo
380 401
 
381 402
 	///////////////////////////////////////////////////////////////////////////
382 403
 
404
+	/**
405
+	 * @param string $str
406
+	 */
383 407
 	function w2i($str)
384 408
 	{
385 409
 		return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
@@ -418,6 +442,10 @@  discard block
 block discarded – undo
418 442
 
419 443
 	///////////////////////////////////////////////////////////////////////////
420 444
 
445
+	/**
446
+	 * @param string $lpData
447
+	 * @param integer $hdrLen
448
+	 */
421 449
 	function load($lpData, &$hdrLen)
422 450
 	{
423 451
 		$hdrLen = 0;
@@ -451,6 +479,9 @@  discard block
 block discarded – undo
451 479
 
452 480
 	///////////////////////////////////////////////////////////////////////////
453 481
 
482
+	/**
483
+	 * @param string $str
484
+	 */
454 485
 	function w2i($str)
455 486
 	{
456 487
 		return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
@@ -488,6 +519,10 @@  discard block
 block discarded – undo
488 519
 
489 520
 	///////////////////////////////////////////////////////////////////////////
490 521
 
522
+	/**
523
+	 * @param string $data
524
+	 * @param integer $datLen
525
+	 */
491 526
 	function load($data, &$datLen)
492 527
 	{
493 528
 		$datLen = 0;
@@ -541,6 +576,10 @@  discard block
 block discarded – undo
541 576
 
542 577
 	///////////////////////////////////////////////////////////////////////////
543 578
 
579
+	/**
580
+	 * @param string $data
581
+	 * @param integer $extLen
582
+	 */
544 583
 	function skipExt(&$data, &$extLen)
545 584
 	{
546 585
 		$extLen = 0;
@@ -586,6 +625,9 @@  discard block
 block discarded – undo
586 625
 
587 626
 	///////////////////////////////////////////////////////////////////////////
588 627
 
628
+	/**
629
+	 * @param string $str
630
+	 */
589 631
 	function w2i($str)
590 632
 	{
591 633
 		return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/classes/svg.php 1 patch
Doc Comments   +30 added lines patch added patch discarded remove patch
@@ -1504,6 +1504,12 @@  discard block
 block discarded – undo
1504 1504
 
1505 1505
 	}
1506 1506
 
1507
+/**
1508
+ * @param string $ry
1509
+ * @param string $angle
1510
+ * @param string $largeArcFlag
1511
+ * @param string $sweepFlag
1512
+ */
1507 1513
 function Arcto($x1, $y1, $x2, $y2, $rx, $ry, $angle, $largeArcFlag, $sweepFlag) {
1508 1514
 
1509 1515
 	// mPDF 5.0.040
@@ -1618,6 +1624,12 @@  discard block
 block discarded – undo
1618 1624
 }
1619 1625
 
1620 1626
 
1627
+	/**
1628
+	 * @param double $ux
1629
+	 * @param double $uy
1630
+	 * @param double $vx
1631
+	 * @param double $vy
1632
+	 */
1621 1633
 	function CalcVectorAngle($ux, $uy, $vx, $vy) {
1622 1634
 		$ta = atan2($uy, $ux);
1623 1635
 		$tb = atan2($vy, $vx);
@@ -2513,6 +2525,9 @@  discard block
 block discarded – undo
2513 2525
 
2514 2526
 
2515 2527
 // mPDF 5.0.040
2528
+/**
2529
+ * @param integer[] $start
2530
+ */
2516 2531
 function calc_bezier_bbox($start, $c) {
2517 2532
 	$P0 = array($start[0],$start[1]);
2518 2533
 	$P1 = array($c[0],$c[1]);
@@ -2554,6 +2569,11 @@  discard block
 block discarded – undo
2554 2569
 }
2555 2570
 
2556 2571
 // mPDF 5.0.040
2572
+/**
2573
+ * @param double $cx
2574
+ * @param double $cy
2575
+ * @param double $cr
2576
+ */
2557 2577
 function _testIntersectCircle($cx, $cy, $cr) {
2558 2578
 	// Tests whether a circle fully encloses a rectangle 0,0,1,1
2559 2579
 	// to see if any further radial gradients need adding (SVG)
@@ -2574,6 +2594,16 @@  discard block
 block discarded – undo
2574 2594
 }
2575 2595
 
2576 2596
 // mPDF 5.0.040
2597
+/**
2598
+ * @param double $x1
2599
+ * @param double $y1
2600
+ * @param double $x2
2601
+ * @param double $y2
2602
+ * @param integer $x3
2603
+ * @param integer $y3
2604
+ * @param integer $x4
2605
+ * @param integer $y4
2606
+ */
2577 2607
 function _testIntersect($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4) {
2578 2608
 	// Tests whether line (x1, y1) and (x2, y2) [a gradient axis (perpendicular)]
2579 2609
 	// intersects with a specific line segment (x3, y3) and (x4, y4)
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/classes/ttfontsuni.php 1 patch
Doc Comments   +58 added lines patch added patch discarded remove patch
@@ -160,6 +160,9 @@  discard block
 block discarded – undo
160 160
 		}
161 161
 	}
162 162
 
163
+	/**
164
+	 * @param integer[] $x
165
+	 */
163 166
 	function sub32($x, $y) {
164 167
 		$xlo = $x[1];
165 168
 		$xhi = $x[0];
@@ -198,11 +201,17 @@  discard block
 block discarded – undo
198 201
 		fseek($this->fh,$this->_pos);
199 202
 	}
200 203
 
204
+	/**
205
+	 * @param integer $delta
206
+	 */
201 207
 	function skip($delta) {
202 208
 		$this->_pos = $this->_pos + $delta;
203 209
 		fseek($this->fh,$delta,SEEK_CUR);
204 210
 	}
205 211
 
212
+	/**
213
+	 * @param string $tag
214
+	 */
206 215
 	function seek_table($tag, $offset_in_table = 0) {
207 216
 		$tpos = $this->get_table_pos($tag);
208 217
 		$this->_pos = $tpos[0] + $offset_in_table;
@@ -225,6 +234,9 @@  discard block
 block discarded – undo
225 234
 		return $a;
226 235
 	}
227 236
 
237
+	/**
238
+	 * @param string $s
239
+	 */
228 240
 	function unpack_short($s) {
229 241
 		$a = (ord($s[0])<<8) + ord($s[1]);
230 242
 		if ($a & (1 << 15) ) { 
@@ -268,15 +280,27 @@  discard block
 block discarded – undo
268 280
 		return pack("n",$val); 
269 281
 	}
270 282
 
283
+	/**
284
+	 * @param string $value
285
+	 */
271 286
 	function splice($stream, $offset, $value) {
272 287
 		return substr($stream,0,$offset) . $value . substr($stream,$offset+strlen($value));
273 288
 	}
274 289
 
290
+	/**
291
+	 * @param string $stream
292
+	 * @param integer $offset
293
+	 */
275 294
 	function _set_ushort($stream, $offset, $value) {
276 295
 		$up = pack("n", $value);
277 296
 		return $this->splice($stream, $offset, $up);
278 297
 	}
279 298
 
299
+	/**
300
+	 * @param string $stream
301
+	 * @param integer $offset
302
+	 * @param integer $val
303
+	 */
280 304
 	function _set_short($stream, $offset, $val) {
281 305
 		if ($val<0) { 
282 306
 			$val = abs($val);
@@ -293,6 +317,9 @@  discard block
 block discarded – undo
293 317
 		return (fread($this->fh,$length));
294 318
 	}
295 319
 
320
+	/**
321
+	 * @param string $tag
322
+	 */
296 323
 	function get_table($tag) {
297 324
 		list($pos, $length) = $this->get_table_pos($tag);
298 325
 		if ($length == 0) { return ''; }
@@ -300,6 +327,10 @@  discard block
 block discarded – undo
300 327
 		return (fread($this->fh,$length));
301 328
 	}
302 329
 
330
+	/**
331
+	 * @param string $tag
332
+	 * @param string $data
333
+	 */
303 334
 	function add($tag, $data) {
304 335
 		if ($tag == 'head') {
305 336
 			$data = $this->splice($data, 8, "\0\0\0\0");
@@ -1686,6 +1717,13 @@  discard block
 block discarded – undo
1686 1717
 
1687 1718
 	//////////////////////////////////////////////////////////////////////////////////
1688 1719
 	// Recursively get composite glyph data
1720
+
1721
+	/**
1722
+	 * @param integer $maxdepth
1723
+	 * @param integer $depth
1724
+	 * @param integer $points
1725
+	 * @param integer $contours
1726
+	 */
1689 1727
 	function getGlyphData($originalGlyphIdx, &$maxdepth, &$depth, &$points, &$contours) {
1690 1728
 		$depth++;
1691 1729
 		$maxdepth = max($maxdepth, $depth);
@@ -1741,6 +1779,11 @@  discard block
 block discarded – undo
1741 1779
 
1742 1780
 	//////////////////////////////////////////////////////////////////////////////////
1743 1781
 
1782
+	/**
1783
+	 * @param integer $numberOfHMetrics
1784
+	 * @param integer $numGlyphs
1785
+	 * @param integer $scale
1786
+	 */
1744 1787
 	function getHMTX($numberOfHMetrics, $numGlyphs, &$glyphToChar, $scale) {
1745 1788
 		$start = $this->seek_table("hmtx");
1746 1789
 		$aw = 0;
@@ -1808,6 +1851,9 @@  discard block
 block discarded – undo
1808 1851
 		$this->charWidths[1] = chr($nCharWidths & 0xFF);
1809 1852
 	}
1810 1853
 
1854
+	/**
1855
+	 * @param integer $numberOfHMetrics
1856
+	 */
1811 1857
 	function getHMetric($numberOfHMetrics, $gid) {
1812 1858
 		$start = $this->seek_table("hmtx");
1813 1859
 		if ($gid < $numberOfHMetrics) {
@@ -1823,6 +1869,10 @@  discard block
 block discarded – undo
1823 1869
 		return $hm;
1824 1870
 	}
1825 1871
 
1872
+	/**
1873
+	 * @param integer $indexToLocFormat
1874
+	 * @param integer $numGlyphs
1875
+	 */
1826 1876
 	function getLOCA($indexToLocFormat, $numGlyphs) {
1827 1877
 		$start = $this->seek_table('loca');
1828 1878
 		$this->glyphPos = array();
@@ -1846,6 +1896,10 @@  discard block
 block discarded – undo
1846 1896
 
1847 1897
 
1848 1898
 	// CMAP Format 4
1899
+
1900
+	/**
1901
+	 * @param integer $unicode_cmap_offset
1902
+	 */
1849 1903
 	function getCMAP4($unicode_cmap_offset, &$glyphToChar, &$charToGlyph ) {
1850 1904
 		$this->maxUniChar = 0;	
1851 1905
 		$this->seek($unicode_cmap_offset + 2);
@@ -1954,6 +2008,10 @@  discard block
 block discarded – undo
1954 2008
 
1955 2009
 
1956 2010
 		// Put the TTF file together
2011
+
2012
+	/**
2013
+	 * @param string $stm
2014
+	 */
1957 2015
 	function endTTFile(&$stm) {
1958 2016
 		$stm = '';
1959 2017
 		$numTables = count($this->otables);
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/includes/functions.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 
43
+/**
44
+ * @param string $str2
45
+ */
43 46
 function _strspn($str1, $str2, $start=null, $length=null) {
44 47
 	$numargs = func_num_args();
45 48
 	if ($numargs == 2) {
@@ -54,6 +57,10 @@  discard block
 block discarded – undo
54 57
 }
55 58
 
56 59
 
60
+/**
61
+ * @param string $str2
62
+ * @param integer $start
63
+ */
57 64
 function _strcspn($str1, $str2, $start=null, $length=null) {
58 65
 	$numargs = func_num_args();
59 66
 	if ($numargs == 2) {
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/PDF_Lib/mpdfi/filters/FilterLZW.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@
 block discarded – undo
30 30
     var $nextBits = 0;
31 31
     var $andTable = array(511, 1023, 2047, 4095);
32 32
 
33
+    /**
34
+     * @param string $msg
35
+     */
33 36
     function error($msg) {
34 37
         die($msg);
35 38
     }
Please login to merge, or discard this patch.
modules/AOW_Actions/actions/actionSendEmail.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -279,6 +279,9 @@
 block discarded – undo
279 279
         return true;
280 280
     }
281 281
 
282
+    /**
283
+     * @param EmailTemplate $template
284
+     */
282 285
     function parse_template(SugarBean $bean, &$template, $object_override = array()){
283 286
         global $sugar_config;
284 287
 
Please login to merge, or discard this patch.