@@ -348,6 +348,7 @@ |
||
348 | 348 | /** |
349 | 349 | * Copy the file to its destination |
350 | 350 | * |
351 | + * @param integer $chmod |
|
351 | 352 | * @return bool |
352 | 353 | **/ |
353 | 354 | function _copyFile($chmod) { |
@@ -108,6 +108,10 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | // apply all parsing routines |
111 | + |
|
112 | + /** |
|
113 | + * @param string $script |
|
114 | + */ |
|
111 | 115 | private function _pack($script) |
112 | 116 | { |
113 | 117 | for ($i = 0; isset($this->_parsers[$i]); $i++) { |
@@ -119,6 +123,10 @@ discard block |
||
119 | 123 | |
120 | 124 | // keep a list of parsing functions, they'll be executed all at once |
121 | 125 | private $_parsers = array(); |
126 | + |
|
127 | + /** |
|
128 | + * @param string $parser |
|
129 | + */ |
|
122 | 130 | private function _addParser($parser) |
123 | 131 | { |
124 | 132 | $this->_parsers[] = $parser; |
@@ -209,6 +217,10 @@ discard block |
||
209 | 217 | } |
210 | 218 | } |
211 | 219 | |
220 | + /** |
|
221 | + * @param string $regexp |
|
222 | + * @param string $encode |
|
223 | + */ |
|
212 | 224 | private function _analyze($script, $regexp, $encode) |
213 | 225 | { |
214 | 226 | // analyse |
@@ -382,6 +394,10 @@ discard block |
||
382 | 394 | } |
383 | 395 | |
384 | 396 | // mmm.. ..which one do i need ?? |
397 | + |
|
398 | + /** |
|
399 | + * @param integer $ascii |
|
400 | + */ |
|
385 | 401 | private function _getEncoder($ascii) |
386 | 402 | { |
387 | 403 | return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ? |
@@ -429,6 +445,9 @@ discard block |
||
429 | 445 | return $res . chr(($charCode % $this->_encoding) + 161); |
430 | 446 | } |
431 | 447 | |
448 | + /** |
|
449 | + * @param string $string |
|
450 | + */ |
|
432 | 451 | private function _safeRegExp($string) |
433 | 452 | { |
434 | 453 | return '/'.preg_replace('/\$/', '\\\$', $string).'/'; |
@@ -459,6 +478,9 @@ discard block |
||
459 | 478 | return '\x'.((string) dechex(ord($match))); |
460 | 479 | } |
461 | 480 | |
481 | + /** |
|
482 | + * @param string $aName |
|
483 | + */ |
|
462 | 484 | private function _getJSFunction($aName) |
463 | 485 | { |
464 | 486 | if (defined('self::JSFUNCTION'.$aName)) |
@@ -584,6 +606,9 @@ discard block |
||
584 | 606 | private $QUOTE = '/\'/'; |
585 | 607 | private $DELETED = '/\\x01[^\\x01]*\\x01/';//g |
586 | 608 | |
609 | + /** |
|
610 | + * @param string $expression |
|
611 | + */ |
|
587 | 612 | public function add($expression, $replacement = '') |
588 | 613 | { |
589 | 614 | // count the number of sub-expressions |
@@ -728,6 +753,10 @@ discard block |
||
728 | 753 | private $buffer; |
729 | 754 | |
730 | 755 | // encode escaped characters |
756 | + |
|
757 | + /** |
|
758 | + * @param string $escapeChar |
|
759 | + */ |
|
731 | 760 | private function _escape($string, $escapeChar) |
732 | 761 | { |
733 | 762 | if ($escapeChar) { |
@@ -751,6 +780,10 @@ discard block |
||
751 | 780 | } |
752 | 781 | |
753 | 782 | // decode escaped characters |
783 | + |
|
784 | + /** |
|
785 | + * @param string $escapeChar |
|
786 | + */ |
|
754 | 787 | private function _unescape($string, $escapeChar) |
755 | 788 | { |
756 | 789 | if ($escapeChar) { |
@@ -781,6 +814,11 @@ discard block |
||
781 | 814 | return $this->buffer['escapeChar'] . $temp; |
782 | 815 | } |
783 | 816 | |
817 | + /** |
|
818 | + * @param string $string |
|
819 | + * |
|
820 | + * @return string |
|
821 | + */ |
|
784 | 822 | private function _internalEscape($string) |
785 | 823 | { |
786 | 824 | return preg_replace($this->ESCAPE, '', $string); |
@@ -178,7 +178,7 @@ |
||
178 | 178 | /** |
179 | 179 | * Sets $_batteryDate. |
180 | 180 | * |
181 | - * @param object $batteryDate battery date |
|
181 | + * @param string $batteryDate battery date |
|
182 | 182 | * |
183 | 183 | * @see UPSDevice::$_batteryDate |
184 | 184 | * |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | * Returns a link to a page with detailed information about the test |
302 | 302 | * URL is formatted as PHPSECINFO_TEST_MOREINFO_BASEURL + testName |
303 | 303 | * |
304 | - * @return string|bool |
|
304 | + * @return string|false |
|
305 | 305 | * @see PHPSECINFO_TEST_MOREINFO_BASEURL |
306 | 306 | */ |
307 | 307 | public function getMoreInfoURL() |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | * |
417 | 417 | * @param string $ini_key |
418 | 418 | * the ini_key you need the value of |
419 | - * @return bool|mixed |
|
419 | + * @return boolean|string |
|
420 | 420 | */ |
421 | 421 | public function getBooleanIniValue($ini_key) |
422 | 422 | { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | /** |
303 | 303 | * read a one-line value from a file with a similar name |
304 | 304 | * |
305 | - * @return value if successfull or null if not |
|
305 | + * @return string|null if successfull or null if not |
|
306 | 306 | */ |
307 | 307 | public static function rolv($similarFileName, $match = "//", $replace = "") |
308 | 308 | { |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * @param string $strElem element of array |
321 | 321 | * @param string &$strBuffer output of the command |
322 | 322 | * |
323 | - * @return string |
|
323 | + * @return boolean |
|
324 | 324 | */ |
325 | 325 | public static function readenv($strElem, &$strBuffer) |
326 | 326 | { |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | * Then it will terminate the script. |
498 | 498 | * See bug #1787137 |
499 | 499 | * |
500 | - * @param array $arrExt additional extensions for which a check should run |
|
500 | + * @param string[] $arrExt additional extensions for which a check should run |
|
501 | 501 | * |
502 | 502 | * @return void |
503 | 503 | */ |
@@ -538,6 +538,8 @@ discard block |
||
538 | 538 | * @param string &$out target string for the output message (reference) |
539 | 539 | * @param string &$err target string for the error message (reference) |
540 | 540 | * @param integer $timeout timeout value in seconds |
541 | + * @param string $out |
|
542 | + * @param string $err |
|
541 | 543 | * |
542 | 544 | * @return boolean timeout expired or not |
543 | 545 | */ |
@@ -652,7 +654,7 @@ discard block |
||
652 | 654 | /** |
653 | 655 | * name natural compare function |
654 | 656 | * |
655 | - * @return comprasion result |
|
657 | + * @return integer result |
|
656 | 658 | */ |
657 | 659 | public static function name_natural_compare($a, $b) |
658 | 660 | { |
@@ -662,6 +664,7 @@ discard block |
||
662 | 664 | /** |
663 | 665 | * readReg function |
664 | 666 | * |
667 | + * @param string $strName |
|
665 | 668 | * @return boolean command successfull or not |
666 | 669 | */ |
667 | 670 | public static function readReg($reg, $strName, &$strBuffer, $booErrorRep = true) |
@@ -703,6 +706,7 @@ discard block |
||
703 | 706 | /** |
704 | 707 | * enumKey function |
705 | 708 | * |
709 | + * @param string $strName |
|
706 | 710 | * @return boolean command successfull or not |
707 | 711 | */ |
708 | 712 | public static function enumKey($key, $strName, &$arrBuffer, $booErrorRep = true) |
@@ -318,7 +318,7 @@ |
||
318 | 318 | * |
319 | 319 | * @see DiskDevice::$_ignore |
320 | 320 | * |
321 | - * @return Integer |
|
321 | + * @return string |
|
322 | 322 | */ |
323 | 323 | public function getIgnore() |
324 | 324 | { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * |
119 | 119 | * @see HWDevice::$_manufacturer |
120 | 120 | * |
121 | - * @return String |
|
121 | + * @return integer |
|
122 | 122 | */ |
123 | 123 | public function getManufacturer() |
124 | 124 | { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * |
145 | 145 | * @see HWDevice::$_product |
146 | 146 | * |
147 | - * @return String |
|
147 | + * @return integer |
|
148 | 148 | */ |
149 | 149 | public function getProduct() |
150 | 150 | { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * |
171 | 171 | * @see HWDevice::$_serial |
172 | 172 | * |
173 | - * @return String |
|
173 | + * @return integer |
|
174 | 174 | */ |
175 | 175 | public function getSerial() |
176 | 176 | { |
@@ -223,6 +223,7 @@ |
||
223 | 223 | * @param array $child part of the array which should be appended to the XML |
224 | 224 | * @param SimpleXMLExtended $xml XML-Object to which the array content is appended |
225 | 225 | * @param array &$positions array with parent positions in xml structure |
226 | + * @param integer[] $positions |
|
226 | 227 | * |
227 | 228 | * @return SimpleXMLExtended Object with the appended array content |
228 | 229 | */ |
@@ -159,6 +159,9 @@ discard block |
||
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | + /** |
|
163 | + * @param string $buffer |
|
164 | + */ |
|
162 | 165 | private function execute_mdstat($buffer) |
163 | 166 | { |
164 | 167 | $raiddata = preg_split("/\r?\n/", $buffer, -1, PREG_SPLIT_NO_EMPTY); |
@@ -342,6 +345,9 @@ discard block |
||
342 | 345 | } |
343 | 346 | } |
344 | 347 | |
348 | + /** |
|
349 | + * @param string $buffer |
|
350 | + */ |
|
345 | 351 | private function execute_dmraid($buffer) |
346 | 352 | { |
347 | 353 | $raiddata = preg_split("/(\r?\n\*\*\* )|(\r?\n--> )/", $buffer, -1, PREG_SPLIT_NO_EMPTY); |
@@ -477,6 +483,9 @@ discard block |
||
477 | 483 | } |
478 | 484 | } |
479 | 485 | |
486 | + /** |
|
487 | + * @param string $buffer |
|
488 | + */ |
|
480 | 489 | private function execute_megactl($buffer, $sas = false) |
481 | 490 | { |
482 | 491 | $raiddata = preg_split("/(\r?\n)+(?=[a-z]\d+ )/", $buffer, -1, PREG_SPLIT_NO_EMPTY); |
@@ -617,6 +626,9 @@ discard block |
||
617 | 626 | } |
618 | 627 | } |
619 | 628 | |
629 | + /** |
|
630 | + * @param string $buffer |
|
631 | + */ |
|
620 | 632 | private function execute_graid($buffer) |
621 | 633 | { |
622 | 634 | if (preg_match('/^Geom name: +([^\n\r]+)/', $buffer, $geom)) { |
@@ -719,6 +731,9 @@ discard block |
||
719 | 731 | } |
720 | 732 | } |
721 | 733 | |
734 | + /** |
|
735 | + * @param string $buffer |
|
736 | + */ |
|
722 | 737 | private function execute_zpool($buffer) |
723 | 738 | { |
724 | 739 | $raiddata = preg_split("/(\r?\n)+ +(?=pool: )/", $buffer, -1, PREG_SPLIT_NO_EMPTY); |
@@ -879,6 +894,9 @@ discard block |
||
879 | 894 | } |
880 | 895 | } |
881 | 896 | |
897 | + /** |
|
898 | + * @param string $buffer |
|
899 | + */ |
|
882 | 900 | private function execute_idrac($buffer, $device) |
883 | 901 | { |
884 | 902 | $snmptablec = array(); //controller table |