@@ -71,8 +71,8 @@ |
||
| 71 | 71 | /** |
| 72 | 72 | * resizeRatio |
| 73 | 73 | * |
| 74 | - * @param int $width |
|
| 75 | - * @param int $height |
|
| 74 | + * @param integer $maxWidth |
|
| 75 | + * @param integer $maxHeight |
|
| 76 | 76 | * @return Image_Backend |
| 77 | 77 | */ |
| 78 | 78 | public function resizeRatio($maxWidth, $maxHeight, $useAsMinimum = false); |
@@ -304,6 +304,10 @@ |
||
| 304 | 304 | // Delete files in the default uploads directory that match the name pattern. |
| 305 | 305 | // @param String $namePattern A regular expression applied to files in the directory. If the name matches |
| 306 | 306 | // the pattern, it is deleted. Directories, . and .. are excluded. |
| 307 | + |
|
| 308 | + /** |
|
| 309 | + * @param string $namePattern |
|
| 310 | + */ |
|
| 307 | 311 | public function deleteTestUploadFiles($namePattern) { |
| 308 | 312 | $tmpFolder = ASSETS_PATH . "/" . Config::inst()->get('Upload', 'uploads_folder'); |
| 309 | 313 | $files = scandir($tmpFolder); |
@@ -51,6 +51,9 @@ discard block |
||
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param Requirements_Backend $backend |
|
| 56 | + */ |
|
| 54 | 57 | protected function setupCombinedRequirements($backend) { |
| 55 | 58 | $basePath = $this->getCurrentRelativePath(); |
| 56 | 59 | |
@@ -76,6 +79,9 @@ discard block |
||
| 76 | 79 | ); |
| 77 | 80 | } |
| 78 | 81 | |
| 82 | + /** |
|
| 83 | + * @param Requirements_Backend $backend |
|
| 84 | + */ |
|
| 79 | 85 | protected function setupCombinedNonrequiredRequirements($backend) { |
| 80 | 86 | $basePath = $this->getCurrentRelativePath(); |
| 81 | 87 | |
@@ -452,6 +458,10 @@ discard block |
||
| 452 | 458 | $this->assertNotRegexp('/RequirementsTest_b\.css\?m=[\d]*&foo=bar&bla=blubb"/', $html); |
| 453 | 459 | } |
| 454 | 460 | |
| 461 | + /** |
|
| 462 | + * @param Requirements_Backend $backend |
|
| 463 | + * @param string $type |
|
| 464 | + */ |
|
| 455 | 465 | public function assertFileIncluded($backend, $type, $files) { |
| 456 | 466 | $type = strtolower($type); |
| 457 | 467 | switch (strtolower($type)) { |
@@ -496,6 +506,10 @@ discard block |
||
| 496 | 506 | } |
| 497 | 507 | } |
| 498 | 508 | |
| 509 | + /** |
|
| 510 | + * @param Requirements_Backend $backend |
|
| 511 | + * @param string $type |
|
| 512 | + */ |
|
| 499 | 513 | public function assertFileNotIncluded($backend, $type, $files) { |
| 500 | 514 | $type = strtolower($type); |
| 501 | 515 | switch ($type) { |
@@ -376,11 +376,17 @@ discard block |
||
| 376 | 376 | |
| 377 | 377 | // LOADING FUNCTIONS |
| 378 | 378 | |
| 379 | + /** |
|
| 380 | + * @param string $input |
|
| 381 | + */ |
|
| 379 | 382 | private function __load($input) { |
| 380 | 383 | $Source = $this->loadFromSource($input); |
| 381 | 384 | return $this->loadWithSource($Source); |
| 382 | 385 | } |
| 383 | 386 | |
| 387 | + /** |
|
| 388 | + * @param string $input |
|
| 389 | + */ |
|
| 384 | 390 | private function __loadString($input) { |
| 385 | 391 | $Source = $this->loadFromString($input); |
| 386 | 392 | return $this->loadWithSource($Source); |
@@ -598,6 +604,7 @@ discard block |
||
| 598 | 604 | /** |
| 599 | 605 | * Used in inlines to check for more inlines or quoted strings |
| 600 | 606 | * @access private |
| 607 | + * @param string $inline |
|
| 601 | 608 | * @return array |
| 602 | 609 | */ |
| 603 | 610 | private function _inlineEscape($inline) { |
@@ -701,12 +708,18 @@ discard block |
||
| 701 | 708 | return $explode; |
| 702 | 709 | } |
| 703 | 710 | |
| 711 | + /** |
|
| 712 | + * @param integer $lineIndent |
|
| 713 | + */ |
|
| 704 | 714 | private function literalBlockContinues ($line, $lineIndent) { |
| 705 | 715 | if (!trim($line)) return true; |
| 706 | 716 | if (strlen($line) - strlen(ltrim($line)) > $lineIndent) return true; |
| 707 | 717 | return false; |
| 708 | 718 | } |
| 709 | 719 | |
| 720 | + /** |
|
| 721 | + * @param boolean $alias |
|
| 722 | + */ |
|
| 710 | 723 | private function referenceContentsByAlias ($alias) { |
| 711 | 724 | do { |
| 712 | 725 | if (!isset($this->SavedGroups[$alias])) { echo "Bad group name: $alias."; break; } |
@@ -799,6 +812,9 @@ discard block |
||
| 799 | 812 | |
| 800 | 813 | } |
| 801 | 814 | |
| 815 | + /** |
|
| 816 | + * @param string $line |
|
| 817 | + */ |
|
| 802 | 818 | private static function startsLiteralBlock ($line) { |
| 803 | 819 | $lastChar = substr (trim($line), -1); |
| 804 | 820 | if ($lastChar != '>' && $lastChar != '|') return false; |
@@ -808,6 +824,9 @@ discard block |
||
| 808 | 824 | return $lastChar; |
| 809 | 825 | } |
| 810 | 826 | |
| 827 | + /** |
|
| 828 | + * @param string $line |
|
| 829 | + */ |
|
| 811 | 830 | private static function greedilyNeedNextLine($line) { |
| 812 | 831 | $line = trim ($line); |
| 813 | 832 | if (!strlen($line)) return false; |
@@ -817,6 +836,10 @@ discard block |
||
| 817 | 836 | return false; |
| 818 | 837 | } |
| 819 | 838 | |
| 839 | + /** |
|
| 840 | + * @param string $literalBlock |
|
| 841 | + * @param string $literalBlockStyle |
|
| 842 | + */ |
|
| 820 | 843 | private function addLiteralLine ($literalBlock, $line, $literalBlockStyle) { |
| 821 | 844 | $line = self::stripIndent($line); |
| 822 | 845 | $line = rtrim ($line, "\r\n\t ") . "\n"; |
@@ -833,6 +856,9 @@ discard block |
||
| 833 | 856 | return $literalBlock . $line; |
| 834 | 857 | } |
| 835 | 858 | |
| 859 | + /** |
|
| 860 | + * @param string $literalBlock |
|
| 861 | + */ |
|
| 836 | 862 | function revertLiteralPlaceHolder ($lineArray, $literalBlock) { |
| 837 | 863 | foreach ($lineArray as $k => $_) { |
| 838 | 864 | if (is_array($_)) |
@@ -848,6 +874,9 @@ discard block |
||
| 848 | 874 | return substr ($line, $indent); |
| 849 | 875 | } |
| 850 | 876 | |
| 877 | + /** |
|
| 878 | + * @param integer $indent |
|
| 879 | + */ |
|
| 851 | 880 | private function getParentPathByIndent ($indent) { |
| 852 | 881 | if ($indent == 0) return array(); |
| 853 | 882 | $linePath = $this->path; |
@@ -873,6 +902,9 @@ discard block |
||
| 873 | 902 | } |
| 874 | 903 | |
| 875 | 904 | |
| 905 | + /** |
|
| 906 | + * @param string $line |
|
| 907 | + */ |
|
| 876 | 908 | private static function isComment ($line) { |
| 877 | 909 | if (!$line) return false; |
| 878 | 910 | if ($line[0] == '#') return true; |
@@ -880,6 +912,9 @@ discard block |
||
| 880 | 912 | return false; |
| 881 | 913 | } |
| 882 | 914 | |
| 915 | + /** |
|
| 916 | + * @param string $line |
|
| 917 | + */ |
|
| 883 | 918 | private static function isEmpty ($line) { |
| 884 | 919 | return (trim ($line) === ''); |
| 885 | 920 | } |
@@ -905,10 +940,16 @@ discard block |
||
| 905 | 940 | } |
| 906 | 941 | |
| 907 | 942 | |
| 943 | + /** |
|
| 944 | + * @param string $line |
|
| 945 | + */ |
|
| 908 | 946 | private function startsMappedSequence ($line) { |
| 909 | 947 | return ($line[0] == '-' && substr ($line, -1, 1) == ':'); |
| 910 | 948 | } |
| 911 | 949 | |
| 950 | + /** |
|
| 951 | + * @param string $line |
|
| 952 | + */ |
|
| 912 | 953 | private function returnMappedSequence ($line) { |
| 913 | 954 | $array = array(); |
| 914 | 955 | $key = trim(substr($line,1,-1)); |
@@ -917,6 +958,9 @@ discard block |
||
| 917 | 958 | return array($array); |
| 918 | 959 | } |
| 919 | 960 | |
| 961 | + /** |
|
| 962 | + * @param string $line |
|
| 963 | + */ |
|
| 920 | 964 | private function returnMappedValue ($line) { |
| 921 | 965 | $array = array(); |
| 922 | 966 | $key = trim(substr($line,0,-1)); |
@@ -924,18 +968,30 @@ discard block |
||
| 924 | 968 | return $array; |
| 925 | 969 | } |
| 926 | 970 | |
| 971 | + /** |
|
| 972 | + * @param string $line |
|
| 973 | + */ |
|
| 927 | 974 | private function startsMappedValue ($line) { |
| 928 | 975 | return (substr ($line, -1, 1) == ':'); |
| 929 | 976 | } |
| 930 | 977 | |
| 978 | + /** |
|
| 979 | + * @param string $line |
|
| 980 | + */ |
|
| 931 | 981 | private function isPlainArray ($line) { |
| 932 | 982 | return ($line[0] == '[' && substr ($line, -1, 1) == ']'); |
| 933 | 983 | } |
| 934 | 984 | |
| 985 | + /** |
|
| 986 | + * @param string $line |
|
| 987 | + */ |
|
| 935 | 988 | private function returnPlainArray ($line) { |
| 936 | 989 | return $this->_toType($line); |
| 937 | 990 | } |
| 938 | 991 | |
| 992 | + /** |
|
| 993 | + * @param string $line |
|
| 994 | + */ |
|
| 939 | 995 | private function returnKeyValuePair ($line) { |
| 940 | 996 | $array = array(); |
| 941 | 997 | if (strpos ($line, ':')) { |
@@ -965,6 +1021,9 @@ discard block |
||
| 965 | 1021 | } |
| 966 | 1022 | |
| 967 | 1023 | |
| 1024 | + /** |
|
| 1025 | + * @param string $line |
|
| 1026 | + */ |
|
| 968 | 1027 | private function returnArrayElement ($line) { |
| 969 | 1028 | if (strlen($line) <= 1) return array(array()); // Weird %) |
| 970 | 1029 | $array = array(); |
@@ -975,6 +1034,9 @@ discard block |
||
| 975 | 1034 | } |
| 976 | 1035 | |
| 977 | 1036 | |
| 1037 | + /** |
|
| 1038 | + * @param string $line |
|
| 1039 | + */ |
|
| 978 | 1040 | private function nodeContainsGroup ($line) { |
| 979 | 1041 | $symbolsForReference = 'A-z0-9_\-'; |
| 980 | 1042 | if (strpos($line, '&') === false && strpos($line, '*') === false) return false; // Please die fast ;-) |
@@ -987,12 +1049,20 @@ discard block |
||
| 987 | 1049 | |
| 988 | 1050 | } |
| 989 | 1051 | |
| 1052 | + /** |
|
| 1053 | + * @param string $line |
|
| 1054 | + * @param string $group |
|
| 1055 | + */ |
|
| 990 | 1056 | private function addGroup ($line, $group) { |
| 991 | 1057 | if ($group[0] == '&') $this->_containsGroupAnchor = substr ($group, 1); |
| 992 | 1058 | if ($group[0] == '*') $this->_containsGroupAlias = substr ($group, 1); |
| 993 | 1059 | //print_r ($this->path); |
| 994 | 1060 | } |
| 995 | 1061 | |
| 1062 | + /** |
|
| 1063 | + * @param string $line |
|
| 1064 | + * @param string $group |
|
| 1065 | + */ |
|
| 996 | 1066 | private function stripGroup ($line, $group) { |
| 997 | 1067 | $line = trim(str_replace($group, '', $line)); |
| 998 | 1068 | return $line; |
@@ -105,6 +105,9 @@ discard block |
||
| 105 | 105 | return $matches; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @param string $string |
|
| 110 | + */ |
|
| 108 | 111 | function _unhtmlentities($string) {
|
| 109 | 112 | $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
|
| 110 | 113 | $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
|
@@ -118,6 +121,10 @@ discard block |
||
| 118 | 121 | |
| 119 | 122 | // Patch in multibyte support |
| 120 | 123 | if (!function_exists('mb_substr')) {
|
| 124 | + |
|
| 125 | + /** |
|
| 126 | + * @param string $str |
|
| 127 | + */ |
|
| 121 | 128 | function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
|
| 122 | 129 | $limit = strlen($str); |
| 123 | 130 | |
@@ -45,6 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Opens a link for pspell. |
| 48 | + * @return string |
|
| 48 | 49 | */ |
| 49 | 50 | function &_getPLink($lang) {
|
| 50 | 51 | // Check for native PSpell support |
@@ -160,7 +160,6 @@ discard block |
||
| 160 | 160 | /** |
| 161 | 161 | * Construct a writer object based on a configuration array |
| 162 | 162 | * |
| 163 | - * @param array $spec config array with writer spec |
|
| 164 | 163 | * @return Zend_Log_Writer_Abstract |
| 165 | 164 | * @throws Zend_Log_Exception |
| 166 | 165 | */ |
@@ -457,7 +456,7 @@ discard block |
||
| 457 | 456 | * Before a message will be received by any of the writers, it |
| 458 | 457 | * must be accepted by all filters added with this method. |
| 459 | 458 | * |
| 460 | - * @param int|Zend_Config|array|Zend_Log_Filter_Interface $filter |
|
| 459 | + * @param Zend_Log_Filter_Priority $filter |
|
| 461 | 460 | * @return Zend_Log |
| 462 | 461 | * @throws Zend_Log_Exception |
| 463 | 462 | */ |
@@ -292,7 +292,7 @@ |
||
| 292 | 292 | * Gets instance of Zend_Log_Formatter_Instance used for formatting a |
| 293 | 293 | * message using Zend_Layout, if applicable. |
| 294 | 294 | * |
| 295 | - * @return Zend_Log_Formatter_Interface|null The formatter, or null. |
|
| 295 | + * @return Zend_Log_Formatter_Interface The formatter, or null. |
|
| 296 | 296 | */ |
| 297 | 297 | public function getLayoutFormatter() |
| 298 | 298 | { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * |
| 49 | 49 | * @param array|string|resource $streamOrUrl Stream or URL to open as a stream |
| 50 | 50 | * @param string|null $mode Mode, only applicable if a URL is given |
| 51 | - * @return void |
|
| 51 | + * @return null|Zend_Log_Writer_Abstract |
|
| 52 | 52 | * @throws Zend_Log_Exception |
| 53 | 53 | */ |
| 54 | 54 | public function __construct($streamOrUrl, $mode = null) |