Completed
Pull Request — master (#584)
by Richard
11:14
created
htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/DOMLex.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -94,6 +94,7 @@  discard block
 block discarded – undo
94 94
      * To iterate is human, to recurse divine - L. Peter Deutsch
95 95
      * @param DOMNode $node DOMNode to be tokenized.
96 96
      * @param HTMLPurifier_Token[] $tokens   Array-list of already tokenized tokens.
97
+     * @param HTMLPurifier_Config $config
97 98
      * @return HTMLPurifier_Token of node appended to previously passed tokens.
98 99
      */
99 100
     protected function tokenizeDOM($node, &$tokens, $config)
@@ -147,6 +148,7 @@  discard block
 block discarded – undo
147 148
      * Portably retrieve the data of a node; deals with older versions
148 149
      * of libxml like 2.7.6
149 150
      * @param DOMNode $node
151
+     * @return string
150 152
      */
151 153
     protected function getData($node)
152 154
     {
Please login to merge, or discard this patch.
htdocs/modules/system/class/thumbs/phpthumb.bmp.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -793,6 +793,9 @@  discard block
 block discarded – undo
793 793
 
794 794
 	// from getid3.lib.php
795 795
 
796
+	/**
797
+	 * @param double $floatnumber
798
+	 */
796 799
 	public function trunc($floatnumber) {
797 800
 		// truncates a floating-point number at the decimal point
798 801
 		// returns int (if possible, otherwise float)
@@ -809,6 +812,9 @@  discard block
 block discarded – undo
809 812
 		return $truncatednumber;
810 813
 	}
811 814
 
815
+	/**
816
+	 * @param string $byteword
817
+	 */
812 818
 	public function LittleEndian2Int($byteword) {
813 819
 		$intvalue = 0;
814 820
 		$byteword = strrev($byteword);
@@ -832,11 +838,17 @@  discard block
 block discarded – undo
832 838
 		return $binvalue;
833 839
 	}
834 840
 
841
+	/**
842
+	 * @param string $rawdata
843
+	 */
835 844
 	public function FixedPoint2_30($rawdata) {
836 845
 		$binarystring = $this->BigEndian2Bin($rawdata);
837 846
 		return $this->Bin2Dec(substr($binarystring, 0, 2)) + (float) ($this->Bin2Dec(substr($binarystring, 2, 30)) / 1073741824);
838 847
 	}
839 848
 
849
+	/**
850
+	 * @param string $binstring
851
+	 */
840 852
 	public function Bin2Dec($binstring, $signed=false) {
841 853
 		$signmult = 1;
842 854
 		if ($signed) {
Please login to merge, or discard this patch.
htdocs/modules/system/class/thumbs/phpthumb.class.php 1 patch
Doc Comments   +26 added lines patch added patch discarded remove patch
@@ -345,6 +345,12 @@  discard block
 block discarded – undo
345 345
 	}
346 346
 
347 347
 	// public:
348
+
349
+	/**
350
+	 * @param string $param
351
+	 *
352
+	 * @return integer
353
+	 */
348 354
 	public function getParameter($param) {
349 355
 		//if (property_exists('phpThumb', $param)) {
350 356
 			return $this->$param;
@@ -1119,6 +1125,10 @@  discard block
 block discarded – undo
1119 1125
 
1120 1126
 	/* True if the provided path points inside one of open_basedirs (or if open_basedirs are disabled) */
1121 1127
 	// http://support.silisoftware.com/phpBB3/viewtopic.php?t=961
1128
+
1129
+	/**
1130
+	 * @param string $path
1131
+	 */
1122 1132
 	public function isInOpenBasedir($path) {
1123 1133
 		static $open_basedirs = null;
1124 1134
 		if (null === $open_basedirs) {
@@ -1136,6 +1146,10 @@  discard block
 block discarded – undo
1136 1146
 
1137 1147
 	/* Resolves all symlinks in $path, checking that each continuous part ends in an allowed zone. Returns null, if any component leads outside of allowed zone. */
1138 1148
 	// http://support.silisoftware.com/phpBB3/viewtopic.php?t=961
1149
+
1150
+	/**
1151
+	 * @return string
1152
+	 */
1139 1153
 	public function resolvePath($path, $allowed_dirs) {
1140 1154
 		$this->DebugMessage('resolvePath: '.$path.' (allowed_dirs: '.print_r($allowed_dirs, true).')', __FILE__, __LINE__);
1141 1155
 
@@ -1393,6 +1407,9 @@  discard block
 block discarded – undo
1393 1407
 	}
1394 1408
 
1395 1409
 
1410
+	/**
1411
+	 * @return string
1412
+	 */
1396 1413
 	public function ImageMagickCommandlineBase() {
1397 1414
 		static $commandline = null;
1398 1415
 		if (null === $commandline) {
@@ -4130,6 +4147,9 @@  discard block
 block discarded – undo
4130 4147
 		return $this->ErrorImage(implode("\n", $DebugOutput), 700, 500, true);
4131 4148
 	}
4132 4149
 
4150
+	/**
4151
+	 * @param string $text
4152
+	 */
4133 4153
 	public function FatalError($text) {
4134 4154
 		if (null === $this->fatalerror) {
4135 4155
 			$this->fatalerror = $text;
@@ -4137,6 +4157,9 @@  discard block
 block discarded – undo
4137 4157
 		return true;
4138 4158
 	}
4139 4159
 
4160
+	/**
4161
+	 * @param string $text
4162
+	 */
4140 4163
 	public function ErrorImage($text, $width=0, $height=0, $forcedisplay=false) {
4141 4164
 		$width  = ($width  ? $width  : $this->config_error_image_width);
4142 4165
 		$height = ($height ? $height : $this->config_error_image_height);
@@ -4382,6 +4405,9 @@  discard block
 block discarded – undo
4382 4405
 		return true;
4383 4406
 	}
4384 4407
 
4408
+	/**
4409
+	 * @param string $message
4410
+	 */
4385 4411
 	public function DebugTimingMessage($message, $file='', $line='', $timestamp=0) {
4386 4412
 		if (!$timestamp) {
4387 4413
 			$timestamp = array_sum(explode(' ', microtime()));
Please login to merge, or discard this patch.
htdocs/modules/system/class/thumbs/phpthumb.filters.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@  discard block
 block discarded – undo
18 18
 	public $phpThumbObject = null;
19 19
 
20 20
 
21
+	/**
22
+	 * @param string $message
23
+	 */
21 24
 	public function DebugMessage($message, $file='', $line='') {
22 25
 		if (is_object($this->phpThumbObject)) {
23 26
 			return $this->phpThumbObject->DebugMessage($message, $file, $line);
@@ -752,6 +755,9 @@  discard block
 block discarded – undo
752 755
 	}
753 756
 
754 757
 
758
+	/**
759
+	 * @param phpthumb $phpThumbObject
760
+	 */
755 761
 	public static function ImprovedImageRotate(&$gdimg_source, $rotate_angle=0, $config_background_hexcolor='FFFFFF', $bg=null, &$phpThumbObject) {
756 762
 		while ($rotate_angle < 0) {
757 763
 			$rotate_angle += 360;
@@ -1049,6 +1055,10 @@  discard block
 block discarded – undo
1049 1055
 	}
1050 1056
 
1051 1057
 
1058
+	/**
1059
+	 * @param boolean $dither
1060
+	 * @param integer $ncolors
1061
+	 */
1052 1062
 	public function ImageTrueColorToPalette2(&$image, $dither, $ncolors) {
1053 1063
 		// http://www.php.net/manual/en/function.imagetruecolortopalette.php
1054 1064
 		// zmorris at zsculpt dot com (17-Aug-2004 06:58)
Please login to merge, or discard this patch.
htdocs/modules/system/class/thumbs/phpthumb.functions.php 1 patch
Doc Comments   +42 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 
26
+	/**
27
+	 * @param string $functionname
28
+	 */
26 29
 	public static function builtin_function_exists($functionname) {
27 30
 		if (function_exists('get_defined_functions')) {
28 31
 			static $get_defined_functions = array();
@@ -35,6 +38,10 @@  discard block
 block discarded – undo
35 38
 	}
36 39
 
37 40
 
41
+	/**
42
+	 * @param string $version1
43
+	 * @param string $version2
44
+	 */
38 45
 	public static function version_compare_replacement_sub($version1, $version2, $operator='') {
39 46
 		// If you specify the third optional operator argument, you can test for a particular relationship.
40 47
 		// The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
@@ -95,6 +102,9 @@  discard block
 block discarded – undo
95 102
 	}
96 103
 
97 104
 
105
+	/**
106
+	 * @param string $version2
107
+	 */
98 108
 	public static function version_compare_replacement($version1, $version2, $operator='') {
99 109
 		if (function_exists('version_compare')) {
100 110
 			// built into PHP v4.1.0+
@@ -212,6 +222,9 @@  discard block
 block discarded – undo
212 222
 		return array($newwidth, $newheight);
213 223
 	}
214 224
 
225
+	/**
226
+	 * @param string $string
227
+	 */
215 228
 	public static function HexCharDisplay($string) {
216 229
 		$len = strlen($string);
217 230
 		$output = '';
@@ -292,6 +305,10 @@  discard block
 block discarded – undo
292 305
 	}
293 306
 
294 307
 
308
+	/**
309
+	 * @param integer $width
310
+	 * @param integer $height
311
+	 */
295 312
 	public static function ScaleToFitInBox($width, $height, $maxwidth=null, $maxheight=null, $allow_enlarge=true, $allow_reduce=true) {
296 313
 		$maxwidth  = (null === $maxwidth  ? $width  : $maxwidth);
297 314
 		$maxheight = (null === $maxheight ? $height : $maxheight);
@@ -380,6 +397,12 @@  discard block
 block discarded – undo
380 397
 	}
381 398
 
382 399
 
400
+	/**
401
+	 * @param integer $src_x
402
+	 * @param integer $src_y
403
+	 * @param integer $src_w
404
+	 * @param integer $src_h
405
+	 */
383 406
 	public static function ImageCopyRespectAlpha(&$dst_im, &$src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $opacity_pct=100) {
384 407
 		$opacipct = $opacity_pct / 100;
385 408
 		for ($x = $src_x; $x < $src_w; $x++) {
@@ -404,6 +427,10 @@  discard block
 block discarded – undo
404 427
 	}
405 428
 
406 429
 
430
+	/**
431
+	 * @param integer $old_width
432
+	 * @param integer $old_height
433
+	 */
407 434
 	public static function ProportionalResize($old_width, $old_height, $new_width=false, $new_height=false) {
408 435
 		$old_aspect_ratio = $old_width / $old_height;
409 436
 		if (($new_width === false) && ($new_height === false)) {
@@ -430,6 +457,9 @@  discard block
 block discarded – undo
430 457
 	}
431 458
 
432 459
 
460
+	/**
461
+	 * @param string $function
462
+	 */
433 463
 	public static function FunctionIsDisabled($function) {
434 464
 		static $DisabledFunctions = null;
435 465
 		if (null === $DisabledFunctions) {
@@ -450,6 +480,11 @@  discard block
 block discarded – undo
450 480
 	}
451 481
 
452 482
 
483
+	/**
484
+	 * @param string $command
485
+	 *
486
+	 * @return string
487
+	 */
453 488
 	public static function SafeExec($command) {
454 489
 		static $AllowedExecFunctions = array();
455 490
 		if (empty($AllowedExecFunctions)) {
@@ -626,6 +661,10 @@  discard block
 block discarded – undo
626 661
 		return false;
627 662
 	}
628 663
 
664
+	/**
665
+	 * @param string $needle
666
+	 * @param string[] $haystack
667
+	 */
629 668
 	public static function CaseInsensitiveInArray($needle, $haystack) {
630 669
 		$needle = strtolower($needle);
631 670
 		foreach ($haystack as $key => $value) {
@@ -638,6 +677,9 @@  discard block
 block discarded – undo
638 677
 		return false;
639 678
 	}
640 679
 
680
+	/**
681
+	 * @param string $file
682
+	 */
641 683
 	public static function URLreadFsock($host, $file, &$errstr, $successonly=true, $port=80, $timeout=10) {
642 684
 		if (!function_exists('fsockopen') || self::FunctionIsDisabled('fsockopen')) {
643 685
 			$errstr = 'fsockopen() unavailable';
Please login to merge, or discard this patch.
htdocs/modules/system/class/thumbs/phpthumb.gif.php 1 patch
Doc Comments   +46 added lines patch added patch discarded remove patch
@@ -64,6 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
 ///////////////////////////////////////////////////////////////////////////////////////////////////
66 66
 
67
+/**
68
+ * @param string $lpszFileName
69
+ */
67 70
 function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1)
68 71
 {
69 72
 	if (!isset($gif) || (@get_class($gif) <> 'cgif') || !$gif->loaded() || ($lpszFileName == '')) {
@@ -186,6 +189,10 @@  discard block
 block discarded – undo
186 189
 
187 190
 	///////////////////////////////////////////////////////////////////////////
188 191
 
192
+	/**
193
+	 * @param string $data
194
+	 * @param integer $datLen
195
+	 */
189 196
 	public function deCompress($data, &$datLen)
190 197
 	{
191 198
 		$stLen  = strlen($data);
@@ -210,6 +217,11 @@  discard block
 block discarded – undo
210 217
 
211 218
 	///////////////////////////////////////////////////////////////////////////
212 219
 
220
+	/**
221
+	 * @param boolean $bInit
222
+	 *
223
+	 * @return integer
224
+	 */
213 225
 	public function LZWCommand(&$data, $bInit)
214 226
 	{
215 227
 		if ($bInit) {
@@ -392,6 +404,10 @@  discard block
 block discarded – undo
392 404
 
393 405
 	///////////////////////////////////////////////////////////////////////////
394 406
 
407
+	/**
408
+	 * @param string $lpData
409
+	 * @param integer $num
410
+	 */
395 411
 	public function load($lpData, $num)
396 412
 	{
397 413
 		$this->m_nColors  = 0;
@@ -504,6 +520,9 @@  discard block
 block discarded – undo
504 520
 
505 521
 	///////////////////////////////////////////////////////////////////////////
506 522
 
523
+	/**
524
+	 * @param integer $hdrLen
525
+	 */
507 526
 	public function load($lpData, &$hdrLen)
508 527
 	{
509 528
 		$hdrLen = 0;
@@ -541,6 +560,9 @@  discard block
 block discarded – undo
541 560
 
542 561
 	///////////////////////////////////////////////////////////////////////////
543 562
 
563
+	/**
564
+	 * @param string $str
565
+	 */
544 566
 	public function w2i($str)
545 567
 	{
546 568
 		return ord($str[ 0 ]) + (ord($str[ 1 ]) << 8);
@@ -579,6 +601,10 @@  discard block
 block discarded – undo
579 601
 
580 602
 	///////////////////////////////////////////////////////////////////////////
581 603
 
604
+	/**
605
+	 * @param string $lpData
606
+	 * @param integer $hdrLen
607
+	 */
582 608
 	public function load($lpData, &$hdrLen)
583 609
 	{
584 610
 		$hdrLen = 0;
@@ -612,6 +638,9 @@  discard block
 block discarded – undo
612 638
 
613 639
 	///////////////////////////////////////////////////////////////////////////
614 640
 
641
+	/**
642
+	 * @param string $str
643
+	 */
615 644
 	public function w2i($str)
616 645
 	{
617 646
 		return ord($str[ 0 ]) + (ord($str[ 1 ]) << 8);
@@ -649,6 +678,10 @@  discard block
 block discarded – undo
649 678
 
650 679
 	///////////////////////////////////////////////////////////////////////////
651 680
 
681
+	/**
682
+	 * @param string $data
683
+	 * @param integer $datLen
684
+	 */
652 685
 	public function load($data, &$datLen)
653 686
 	{
654 687
 		$datLen = 0;
@@ -696,6 +729,10 @@  discard block
 block discarded – undo
696 729
 
697 730
 	///////////////////////////////////////////////////////////////////////////
698 731
 
732
+	/**
733
+	 * @param string $data
734
+	 * @param integer $extLen
735
+	 */
699 736
 	public function skipExt(&$data, &$extLen)
700 737
 	{
701 738
 		$extLen = 0;
@@ -741,6 +778,9 @@  discard block
 block discarded – undo
741 778
 
742 779
 	///////////////////////////////////////////////////////////////////////////
743 780
 
781
+	/**
782
+	 * @param string $str
783
+	 */
744 784
 	public function w2i($str)
745 785
 	{
746 786
 		return ord($str[ 0 ]) + (ord($str[ 1 ]) << 8);
@@ -814,6 +854,9 @@  discard block
 block discarded – undo
814 854
 
815 855
 	///////////////////////////////////////////////////////////////////////////
816 856
 
857
+	/**
858
+	 * @param integer $iIndex
859
+	 */
817 860
 	public function loadFile($lpszFileName, $iIndex)
818 861
 	{
819 862
 		if ($iIndex < 0) {
@@ -967,6 +1010,9 @@  discard block
 block discarded – undo
967 1010
 
968 1011
 	///////////////////////////////////////////////////////////////////////////
969 1012
 
1013
+	/**
1014
+	 * @param integer $bgColor
1015
+	 */
970 1016
 	public function getPng($bgColor)
971 1017
 	{
972 1018
 		$out = '';
Please login to merge, or discard this patch.
htdocs/class/libraries/vendor/paragonie/random_compat/lib/random.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
          * We don't have any more options, so let's throw an exception right now
203 203
          * and hope the developer won't let it fail silently.
204 204
          *
205
-         * @param mixed $length
205
+         * @param integer $length
206 206
          * @psalm-suppress MissingReturnType
207 207
          * @throws Exception
208 208
          * @return string
Please login to merge, or discard this patch.
htdocs/class/libraries/vendor/symfony/polyfill-mbstring/bootstrap.php 1 patch
Doc Comments   +39 added lines patch added patch discarded remove patch
@@ -20,30 +20,69 @@
 block discarded – undo
20 20
     function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
21 21
     function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
22 22
     function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
23
+
24
+    /**
25
+     * @param string $s
26
+     * @param integer[] $convmap
27
+     */
23 28
     function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
24 29
     function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
30
+
31
+    /**
32
+     * @param string|boolean $enc
33
+     */
25 34
     function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
26 35
     function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
27 36
     function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
28 37
     function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
38
+
39
+    /**
40
+     * @param string $var
41
+     * @param string $encoding
42
+     */
29 43
     function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
30 44
     function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
31 45
     function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
32 46
     function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
33 47
     function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
48
+
49
+    /**
50
+     * @param string $s
51
+     * @param string $needle
52
+     * @param string $enc
53
+     */
34 54
     function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
55
+
56
+    /**
57
+     * @param string $s
58
+     * @param string $enc
59
+     */
35 60
     function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
36 61
     function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
37 62
     function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
38 63
     function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
64
+
65
+    /**
66
+     * @param string $enc
67
+     */
39 68
     function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
40 69
     function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
41 70
     function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
42 71
     function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
43 72
     function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
73
+
74
+    /**
75
+     * @param string $s
76
+     * @param string $needle
77
+     * @param string $enc
78
+     */
44 79
     function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
45 80
     function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
46 81
     function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
82
+
83
+    /**
84
+     * @param string $enc
85
+     */
47 86
     function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
48 87
     function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
49 88
     function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
Please login to merge, or discard this patch.
htdocs/class/libraries/vendor/webmozart/assert/src/Assert.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -444,6 +444,9 @@  discard block
 block discarded – undo
444 444
         }
445 445
     }
446 446
 
447
+    /**
448
+     * @param integer $value
449
+     */
447 450
     public static function eq($value, $value2, $message = '')
448 451
     {
449 452
         if ($value2 != $value) {
@@ -455,6 +458,9 @@  discard block
 block discarded – undo
455 458
         }
456 459
     }
457 460
 
461
+    /**
462
+     * @param string $value2
463
+     */
458 464
     public static function notEq($value, $value2, $message = '')
459 465
     {
460 466
         if ($value2 == $value) {
@@ -1076,6 +1082,9 @@  discard block
 block discarded – undo
1076 1082
         return mb_strwidth($value, $encoding);
1077 1083
     }
1078 1084
 
1085
+    /**
1086
+     * @param string $message
1087
+     */
1079 1088
     protected static function reportInvalidArgument($message)
1080 1089
     {
1081 1090
         throw new InvalidArgumentException($message);
Please login to merge, or discard this patch.