@@ -245,6 +245,10 @@ discard block |
||
| 245 | 245 | * match. The caller must trim matching lines from the beginning and end |
| 246 | 246 | * of the portions it is going to specify. |
| 247 | 247 | */ |
| 248 | + |
|
| 249 | + /** |
|
| 250 | + * @param double $nchunks |
|
| 251 | + */ |
|
| 248 | 252 | private function diag($xoff, $xlim, $yoff, $ylim, $nchunks) |
| 249 | 253 | { |
| 250 | 254 | $flip = false; |
@@ -356,6 +360,11 @@ discard block |
||
| 356 | 360 | * Note that XLIM, YLIM are exclusive bounds. |
| 357 | 361 | * All line numbers are origin-0 and discarded lines are not counted. |
| 358 | 362 | */ |
| 363 | + |
|
| 364 | + /** |
|
| 365 | + * @param integer $xoff |
|
| 366 | + * @param integer $yoff |
|
| 367 | + */ |
|
| 359 | 368 | private function compareseq($xoff, $xlim, $yoff, $ylim) |
| 360 | 369 | { |
| 361 | 370 | // Slide down the bottom initial diagonal. |
@@ -779,6 +788,9 @@ discard block |
||
| 779 | 788 | return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; |
| 780 | 789 | } |
| 781 | 790 | |
| 791 | + /** |
|
| 792 | + * @param string $header |
|
| 793 | + */ |
|
| 782 | 794 | protected function start_block($header) |
| 783 | 795 | { |
| 784 | 796 | echo $header; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * Reads the raw content and send events |
| 147 | 147 | * into the page to be built. |
| 148 | - * @param $response SimpleHttpResponse Fetched response. |
|
| 148 | + * @param SilverStripe\Dev\TestSession_STResponseWrapper $response SimpleHttpResponse Fetched response. |
|
| 149 | 149 | * @return SimplePage Newly parsed page. |
| 150 | 150 | * @access public |
| 151 | 151 | */ |
@@ -170,8 +170,8 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | 172 | * Creates the parser used with the builder. |
| 173 | - * @param $listener SimpleSaxListener Target of parser. |
|
| 174 | - * @return SimpleSaxParser Parser to generate |
|
| 173 | + * @param SimplePageBuilder $listener SimpleSaxListener Target of parser. |
|
| 174 | + * @return SimpleHtmlSaxParser Parser to generate |
|
| 175 | 175 | * events for the builder. |
| 176 | 176 | * @access protected |
| 177 | 177 | */ |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | /** |
| 408 | 408 | * Original request as bytes sent down the wire. |
| 409 | - * @return mixed Sent content. |
|
| 409 | + * @return string|false Sent content. |
|
| 410 | 410 | * @access public |
| 411 | 411 | */ |
| 412 | 412 | function getRequest() { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | /** |
| 417 | 417 | * Accessor for raw text of page. |
| 418 | - * @return string Raw unparsed content. |
|
| 418 | + * @return boolean Raw unparsed content. |
|
| 419 | 419 | * @access public |
| 420 | 420 | */ |
| 421 | 421 | function getRaw() { |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | |
| 468 | 468 | /** |
| 469 | 469 | * Base URL if set via BASE tag page url otherwise |
| 470 | - * @return SimpleUrl Base url. |
|
| 470 | + * @return boolean Base url. |
|
| 471 | 471 | * @access public |
| 472 | 472 | */ |
| 473 | 473 | function getBaseUrl() { |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | /** |
| 659 | 659 | * Opens a frameset. A frameset may contain nested |
| 660 | 660 | * frameset tags. |
| 661 | - * @param SimpleFramesetTag $tag Tag to accept. |
|
| 661 | + * @param SimpleTag $tag Tag to accept. |
|
| 662 | 662 | * @access public |
| 663 | 663 | */ |
| 664 | 664 | function acceptFramesetStart(&$tag) { |
@@ -61,9 +61,17 @@ discard block |
||
| 61 | 61 | return $path; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param integer $parent |
|
| 66 | + * @param integer $position |
|
| 67 | + */ |
|
| 64 | 68 | function _create($parent, $position) { |
| 65 | 69 | return $this->_move(0, $parent, $position); |
| 66 | 70 | } |
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @param integer $id |
|
| 74 | + */ |
|
| 67 | 75 | function _remove($id) { |
| 68 | 76 | if((int)$id === 1) { return false; } |
| 69 | 77 | $data = $this->_get_node($id); |
@@ -100,6 +108,10 @@ discard block |
||
| 100 | 108 | ); |
| 101 | 109 | return true; |
| 102 | 110 | } |
| 111 | + |
|
| 112 | + /** |
|
| 113 | + * @param integer $id |
|
| 114 | + */ |
|
| 103 | 115 | function _move($id, $ref_id, $position = 0, $is_copy = false) { |
| 104 | 116 | if((int)$ref_id === 0 || (int)$id === 1) { return false; } |
| 105 | 117 | $sql = array(); // Queries executed at the end |
@@ -238,6 +250,10 @@ discard block |
||
| 238 | 250 | if($is_copy) $this->_fix_copy($ind, $position); |
| 239 | 251 | return $node === false || $is_copy ? $ind : true; |
| 240 | 252 | } |
| 253 | + |
|
| 254 | + /** |
|
| 255 | + * @param integer $position |
|
| 256 | + */ |
|
| 241 | 257 | function _fix_copy($id, $position) { |
| 242 | 258 | $node = $this->_get_node($id); |
| 243 | 259 | $children = $this->_get_children($id, true); |
@@ -118,6 +118,10 @@ |
||
| 118 | 118 | |
| 119 | 119 | // Patch in multibyte support |
| 120 | 120 | if (!function_exists('mb_substr')) {
|
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @param string $str |
|
| 124 | + */ |
|
| 121 | 125 | function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
|
| 122 | 126 | $limit = strlen($str); |
| 123 | 127 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | /** |
| 53 | 53 | * Throws an error message back to the user. This will stop all execution. |
| 54 | 54 | * |
| 55 | - * @param {String} $str Message to send back to user.
|
|
| 55 | + * @param string $str Message to send back to user. |
|
| 56 | 56 | */ |
| 57 | 57 | function throwError($str) {
|
| 58 | 58 | die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
@@ -342,6 +342,9 @@ discard block |
||
| 342 | 342 | return null; |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | + /** |
|
| 346 | + * @param integer $len |
|
| 347 | + */ |
|
| 345 | 348 | function skip($len) { |
| 346 | 349 | $this->_pos += $len; |
| 347 | 350 | } |
@@ -369,6 +372,9 @@ discard block |
||
| 369 | 372 | return $this->readValue($reader); |
| 370 | 373 | } |
| 371 | 374 | |
| 375 | + /** |
|
| 376 | + * @param Moxiecode_JSONReader $reader |
|
| 377 | + */ |
|
| 372 | 378 | function readValue(&$reader) { |
| 373 | 379 | $this->data = array(); |
| 374 | 380 | $this->parents = array(); |
@@ -554,6 +560,11 @@ discard block |
||
| 554 | 560 | return '"' . $input . '"'; |
| 555 | 561 | } |
| 556 | 562 | |
| 563 | + /** |
|
| 564 | + * @param string $utf8 |
|
| 565 | + * |
|
| 566 | + * @return string |
|
| 567 | + */ |
|
| 557 | 568 | function _utf82utf16($utf8) { |
| 558 | 569 | if (function_exists('mb_convert_encoding')) |
| 559 | 570 | return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); |
@@ -86,6 +86,9 @@ discard block |
||
| 86 | 86 | return $this->_level; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + /** |
|
| 90 | + * @param string $path |
|
| 91 | + */ |
|
| 89 | 92 | function setPath($path) {
|
| 90 | 93 | $this->_path = $path; |
| 91 | 94 | } |
@@ -102,6 +105,9 @@ discard block |
||
| 102 | 105 | return $this->_filename; |
| 103 | 106 | } |
| 104 | 107 | |
| 108 | + /** |
|
| 109 | + * @param string $format |
|
| 110 | + */ |
|
| 105 | 111 | function setFormat($format) {
|
| 106 | 112 | $this->_format = $format; |
| 107 | 113 | } |
@@ -110,6 +116,9 @@ discard block |
||
| 110 | 116 | return $this->_format; |
| 111 | 117 | } |
| 112 | 118 | |
| 119 | + /** |
|
| 120 | + * @param string $size |
|
| 121 | + */ |
|
| 113 | 122 | function setMaxSize($size) {
|
| 114 | 123 | // Fix log max size |
| 115 | 124 | $logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size));
|
@@ -130,6 +139,9 @@ discard block |
||
| 130 | 139 | return $this->_maxSize; |
| 131 | 140 | } |
| 132 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $max_files |
|
| 144 | + */ |
|
| 133 | 145 | function setMaxFiles($max_files) {
|
| 134 | 146 | $this->_maxFiles = $max_files; |
| 135 | 147 | } |
@@ -183,6 +195,10 @@ discard block |
||
| 183 | 195 | return $this->_level >= MC_LOGGER_FATAL; |
| 184 | 196 | } |
| 185 | 197 | |
| 198 | + /** |
|
| 199 | + * @param integer $level |
|
| 200 | + * @param string $message |
|
| 201 | + */ |
|
| 186 | 202 | function _logMsg($level, $message) {
|
| 187 | 203 | $roll = false; |
| 188 | 204 | |
@@ -83,7 +83,6 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Adds a file to the concatenation/compression process. |
| 85 | 85 | * |
| 86 | - * @param String $path Path to the file to include in the compressed package/output. |
|
| 87 | 86 | */ |
| 88 | 87 | public function &addFile($file) { |
| 89 | 88 | $this->files .= ($this->files ? "," : "") . $file; |
@@ -256,7 +255,7 @@ discard block |
||
| 256 | 255 | /** |
| 257 | 256 | * Renders a script tag that loads the TinyMCE script. |
| 258 | 257 | * |
| 259 | - * @param Array $settings Name/value array with settings for the script tag. |
|
| 258 | + * @param Array $tagSettings Name/value array with settings for the script tag. |
|
| 260 | 259 | * @param Bool $return The script tag is return instead of being output if true |
| 261 | 260 | * @return String the tag is returned if $return is true |
| 262 | 261 | */ |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * Check if this file can be modified |
| 424 | 424 | * |
| 425 | 425 | * @param Member $member |
| 426 | - * @return boolean |
|
| 426 | + * @return boolean|string |
|
| 427 | 427 | */ |
| 428 | 428 | public function canEdit($member = null) |
| 429 | 429 | { |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | * |
| 445 | 445 | * @param Member $member |
| 446 | 446 | * @param array $context |
| 447 | - * @return boolean |
|
| 447 | + * @return boolean|string |
|
| 448 | 448 | */ |
| 449 | 449 | public function canCreate($member = null, $context = array()) |
| 450 | 450 | { |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | * Check if this file can be deleted |
| 465 | 465 | * |
| 466 | 466 | * @param Member $member |
| 467 | - * @return boolean |
|
| 467 | + * @return boolean|string |
|
| 468 | 468 | */ |
| 469 | 469 | public function canDelete($member = null) |
| 470 | 470 | { |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | * |
| 698 | 698 | * @param string $condition The PHP condition to be evaluated. The page will be called $item |
| 699 | 699 | * @param array $collator An array, passed by reference, to collect all of the matching descendants. |
| 700 | - * @return true|null |
|
| 700 | + * @return boolean|null |
|
| 701 | 701 | */ |
| 702 | 702 | public function collateDescendants($condition, &$collator) |
| 703 | 703 | { |
@@ -1089,6 +1089,7 @@ discard block |
||
| 1089 | 1089 | * |
| 1090 | 1090 | * @param String File extension, without dot prefix. Use an asterisk ('*') |
| 1091 | 1091 | * to specify a generic fallback if no mapping is found for an extension. |
| 1092 | + * @param string $ext |
|
| 1092 | 1093 | * @return String Classname for a subclass of {@link File} |
| 1093 | 1094 | */ |
| 1094 | 1095 | public static function get_class_for_file_extension($ext) |
@@ -1248,7 +1249,6 @@ discard block |
||
| 1248 | 1249 | * Note that the result will not have a leading slash, and should not be used |
| 1249 | 1250 | * with local file paths. |
| 1250 | 1251 | * |
| 1251 | - * @param string $part,... Parts |
|
| 1252 | 1252 | * @return string |
| 1253 | 1253 | */ |
| 1254 | 1254 | public static function join_paths($part = null) |