@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @param string $name the field name |
| 78 | 78 | * @param string $title the field label |
| 79 | - * @param string|array $sourceObject The object-type to list in the tree. This could |
|
| 79 | + * @param string $sourceObject The object-type to list in the tree. This could |
|
| 80 | 80 | * be one of the following: |
| 81 | 81 | * - A DataObject class name with the {@link Hierarchy} extension. |
| 82 | 82 | * - An array of key/value pairs, like a {@link DropdownField} source. In |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | - * @return HTMLText |
|
| 207 | + * @return string |
|
| 208 | 208 | */ |
| 209 | 209 | public function Field($properties = array()) { |
| 210 | 210 | Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang'); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * If a filter function has been set, that will be called. And if search text is set, |
| 386 | 386 | * filter on that too. Return true if all applicable conditions are true, false otherwise. |
| 387 | 387 | * @param $node |
| 388 | - * @return unknown_type |
|
| 388 | + * @return boolean |
|
| 389 | 389 | */ |
| 390 | 390 | public function filterMarking($node) { |
| 391 | 391 | if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false; |
@@ -436,7 +436,6 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | /** |
| 439 | - * @param String $field |
|
| 440 | 439 | */ |
| 441 | 440 | public function setSourceObject($class) { |
| 442 | 441 | $this->sourceObject = $class; |
@@ -385,6 +385,7 @@ discard block |
||
| 385 | 385 | * - minutes |
| 386 | 386 | * - seconds |
| 387 | 387 | * This includes the singular forms as well |
| 388 | + * @param string $date |
|
| 388 | 389 | * @return string SQL datetime expression to query for a datetime (YYYY-MM-DD hh:mm:ss) which is the result of |
| 389 | 390 | * the addition |
| 390 | 391 | */ |
@@ -398,6 +399,7 @@ discard block |
||
| 398 | 399 | * e.g. '"SiteTree"."Created"' |
| 399 | 400 | * @param string $date2 to be substracted of $date1, can be either 'now', literal datetime |
| 400 | 401 | * like '1973-10-14 10:30:00' or field name, e.g. '"SiteTree"."Created"' |
| 402 | + * @param string $date1 |
|
| 401 | 403 | * @return string SQL datetime expression to query for the interval between $date1 and $date2 in seconds which |
| 402 | 404 | * is the result of the substraction |
| 403 | 405 | */ |
@@ -625,7 +627,7 @@ discard block |
||
| 625 | 627 | * @param boolean $create Flag indicating whether the database should be created |
| 626 | 628 | * if it doesn't exist. If $create is false and the database doesn't exist |
| 627 | 629 | * then an error will be raised |
| 628 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 630 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 629 | 631 | * should be raised |
| 630 | 632 | * @return boolean Flag indicating success |
| 631 | 633 | */ |
@@ -785,6 +787,7 @@ discard block |
||
| 785 | 787 | |
| 786 | 788 | /** |
| 787 | 789 | * @deprecated since version 4.0 Use DB::field_list instead |
| 790 | + * @param string $table |
|
| 788 | 791 | */ |
| 789 | 792 | public function fieldList($table) { |
| 790 | 793 | Deprecation::notice('4.0', 'Use DB::field_list instead'); |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | /** |
| 590 | 590 | * Resize this image for the CMS. Use in templates with $CMSThumbnail |
| 591 | 591 | * |
| 592 | - * @return Image_Cached|null |
|
| 592 | + * @return Image|null |
|
| 593 | 593 | */ |
| 594 | 594 | public function CMSThumbnail() { |
| 595 | 595 | return $this->Pad($this->stat('cms_thumbnail_width'),$this->stat('cms_thumbnail_height')); |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | /** |
| 632 | 632 | * Resize this image for use as a thumbnail in a strip. Use in templates with $StripThumbnail. |
| 633 | 633 | * |
| 634 | - * @return Image_Cached|null |
|
| 634 | + * @return Image|null |
|
| 635 | 635 | */ |
| 636 | 636 | public function StripThumbnail() { |
| 637 | 637 | return $this->Fill($this->stat('strip_thumbnail_width'),$this->stat('strip_thumbnail_height')); |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | /** |
| 869 | 869 | * Generate patterns that will help to match filenames of cached images |
| 870 | 870 | * @param string $filename Filename of source image |
| 871 | - * @return array |
|
| 871 | + * @return string |
|
| 872 | 872 | */ |
| 873 | 873 | private function getFilenamePatterns($filename) { |
| 874 | 874 | $methodNames = $this->allMethodNames(true); |
@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | |
| 1025 | 1025 | /** |
| 1026 | 1026 | * Get the orientation of this image. |
| 1027 | - * @return ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE |
|
| 1027 | + * @return integer | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE |
|
| 1028 | 1028 | */ |
| 1029 | 1029 | public function getOrientation() { |
| 1030 | 1030 | $width = $this->getWidth(); |
@@ -46,6 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @param $url Human-readable URL. |
| 48 | 48 | * @returns string/bool URL of an endpoint, or false if no matching provider exists. |
| 49 | + * @return string |
|
| 49 | 50 | */ |
| 50 | 51 | protected static function find_endpoint($url) { |
| 51 | 52 | foreach(self::get_providers() as $scheme=>$endpoint) { |
@@ -117,7 +118,7 @@ discard block |
||
| 117 | 118 | * Given a response body, determine if there is an autodiscover url |
| 118 | 119 | * |
| 119 | 120 | * @param string $body |
| 120 | - * @return bool|string |
|
| 121 | + * @return string|false |
|
| 121 | 122 | */ |
| 122 | 123 | public static function autodiscover_from_body($body) { |
| 123 | 124 | // Look within the body for an oembed link. |
@@ -259,6 +260,9 @@ discard block |
||
| 259 | 260 | parent::__construct(); |
| 260 | 261 | } |
| 261 | 262 | |
| 263 | + /** |
|
| 264 | + * @return string |
|
| 265 | + */ |
|
| 262 | 266 | public function getOembedURL() { |
| 263 | 267 | return $this->url; |
| 264 | 268 | } |
@@ -343,6 +347,7 @@ discard block |
||
| 343 | 347 | |
| 344 | 348 | /** |
| 345 | 349 | * Wrap the check for looking into Oembed JSON within $this->data. |
| 350 | + * @param string $field |
|
| 346 | 351 | */ |
| 347 | 352 | public function hasField($field) { |
| 348 | 353 | $this->loadData(); |
@@ -120,6 +120,9 @@ discard block |
||
| 120 | 120 | Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js'); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | + /** |
|
| 124 | + * @param string $action |
|
| 125 | + */ |
|
| 123 | 126 | public function Link($action = null) { |
| 124 | 127 | if(!$action) $action = $this->sanitiseClassName($this->modelClass); |
| 125 | 128 | return parent::Link($action); |
@@ -219,6 +222,9 @@ discard block |
||
| 219 | 222 | return $form; |
| 220 | 223 | } |
| 221 | 224 | |
| 225 | + /** |
|
| 226 | + * @return GridFieldComponent |
|
| 227 | + */ |
|
| 222 | 228 | public function getList() { |
| 223 | 229 | $context = $this->getSearchContext(); |
| 224 | 230 | $params = $this->getRequest()->requestVar('q'); |
@@ -274,6 +280,7 @@ discard block |
||
| 274 | 280 | |
| 275 | 281 | /** |
| 276 | 282 | * Unsanitise a model class' name from a URL param |
| 283 | + * @param string $class |
|
| 277 | 284 | * @return string |
| 278 | 285 | */ |
| 279 | 286 | protected function unsanitiseClassName($class) { |
@@ -414,7 +421,7 @@ discard block |
||
| 414 | 421 | * @param array $data |
| 415 | 422 | * @param Form $form |
| 416 | 423 | * @param SS_HTTPRequest $request |
| 417 | - * @return bool|null |
|
| 424 | + * @return false|null |
|
| 418 | 425 | */ |
| 419 | 426 | public function import($data, $form, $request) { |
| 420 | 427 | if(!$this->showImportForm || (is_array($this->showImportForm) |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | * @param string $mode clean mode |
| 141 | 141 | * @param array $tags array of tags |
| 142 | 142 | * @throws Zend_Cache_Exception |
| 143 | - * @return boolean true if no problem |
|
| 143 | + * @return boolean|null true if no problem |
|
| 144 | 144 | */ |
| 145 | 145 | public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) |
| 146 | 146 | { |
@@ -97,6 +97,7 @@ |
||
| 97 | 97 | /** |
| 98 | 98 | * Returns true if negotation is enabled for the given response. |
| 99 | 99 | * By default, negotiation is only enabled for pages that have the xml header. |
| 100 | + * @param SS_HTTPResponse $response |
|
| 100 | 101 | */ |
| 101 | 102 | public static function enabled_for($response) { |
| 102 | 103 | $contentType = $response->getHeader("Content-Type"); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @param string|callable $code Either a string that can evaluate to an expression |
| 100 | 100 | * to rewrite links (depreciated), or a callable that takes a single |
| 101 | 101 | * parameter and returns the rewritten URL |
| 102 | - * @return The content with all links rewritten as per the logic specified in $code |
|
| 102 | + * @return string content with all links rewritten as per the logic specified in $code |
|
| 103 | 103 | */ |
| 104 | 104 | public static function urlRewriter($content, $code) { |
| 105 | 105 | if(!is_callable($code)) { |
@@ -243,6 +243,9 @@ discard block |
||
| 243 | 243 | return count($result) ? $result : null; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | + /** |
|
| 247 | + * @param string $content |
|
| 248 | + */ |
|
| 246 | 249 | public static function getLinksIn($content) { |
| 247 | 250 | return self::findByTagAndAttribute($content, array("a" => "href")); |
| 248 | 251 | } |
@@ -285,6 +288,7 @@ discard block |
||
| 285 | 288 | |
| 286 | 289 | /** |
| 287 | 290 | * Set the maximum age of this page in web caches, in seconds |
| 291 | + * @param integer $age |
|
| 288 | 292 | */ |
| 289 | 293 | public static function set_cache_age($age) { |
| 290 | 294 | self::$cache_age = $age; |
@@ -296,11 +300,17 @@ discard block |
||
| 296 | 300 | self::$modification_date = $timestamp; |
| 297 | 301 | } |
| 298 | 302 | |
| 303 | + /** |
|
| 304 | + * @param integer $timestamp |
|
| 305 | + */ |
|
| 299 | 306 | public static function register_modification_timestamp($timestamp) { |
| 300 | 307 | if($timestamp > self::$modification_date) |
| 301 | 308 | self::$modification_date = $timestamp; |
| 302 | 309 | } |
| 303 | 310 | |
| 311 | + /** |
|
| 312 | + * @param string $etag |
|
| 313 | + */ |
|
| 304 | 314 | public static function register_etag($etag) { |
| 305 | 315 | if (0 !== strpos($etag, '"')) { |
| 306 | 316 | $etag = sprintf('"%s"', $etag); |
@@ -226,6 +226,12 @@ discard block |
||
| 226 | 226 | set_exception_handler('exceptionHandler'); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | + /** |
|
| 230 | + * @param integer $errno |
|
| 231 | + * @param string $errstr |
|
| 232 | + * @param string $errfile |
|
| 233 | + * @param integer $errline |
|
| 234 | + */ |
|
| 229 | 235 | public static function noticeHandler($errno, $errstr, $errfile, $errline, $errcontext) { |
| 230 | 236 | if(error_reporting() == 0) return; |
| 231 | 237 | ini_set('display_errors', 0); |
@@ -252,10 +258,10 @@ discard block |
||
| 252 | 258 | /** |
| 253 | 259 | * Handle a non-fatal warning error thrown by PHP interpreter. |
| 254 | 260 | * |
| 255 | - * @param unknown_type $errno |
|
| 256 | - * @param unknown_type $errstr |
|
| 257 | - * @param unknown_type $errfile |
|
| 258 | - * @param unknown_type $errline |
|
| 261 | + * @param integer $errno |
|
| 262 | + * @param string $errstr |
|
| 263 | + * @param string $errfile |
|
| 264 | + * @param integer $errline |
|
| 259 | 265 | * @param unknown_type $errcontext |
| 260 | 266 | */ |
| 261 | 267 | public static function warningHandler($errno, $errstr, $errfile, $errline, $errcontext) { |
@@ -286,8 +292,8 @@ discard block |
||
| 286 | 292 | * |
| 287 | 293 | * Runtime execution dies immediately once the error is generated. |
| 288 | 294 | * |
| 289 | - * @param unknown_type $errno |
|
| 290 | - * @param unknown_type $errstr |
|
| 295 | + * @param integer $errno |
|
| 296 | + * @param string $errstr |
|
| 291 | 297 | * @param unknown_type $errfile |
| 292 | 298 | * @param unknown_type $errline |
| 293 | 299 | * @param unknown_type $errcontext |
@@ -327,7 +333,7 @@ discard block |
||
| 327 | 333 | * or "tech-speak". Used in the HTTP Header and ajax responses. |
| 328 | 334 | * @param string $friendlyErrorDetail Detailed user-focused message. Is just used if no {@link ErrorPage} is found |
| 329 | 335 | * for this specific status code. |
| 330 | - * @return string HTML error message for non-ajax requests, plaintext for ajax-request. |
|
| 336 | + * @return boolean HTML error message for non-ajax requests, plaintext for ajax-request. |
|
| 331 | 337 | */ |
| 332 | 338 | public static function friendlyError($statusCode=500, $friendlyErrorMessage=null, $friendlyErrorDetail=null) { |
| 333 | 339 | // Ensure the error message complies with the HTTP 1.1 spec |
@@ -399,6 +405,7 @@ discard block |
||
| 399 | 405 | * @param unknown_type $errfile |
| 400 | 406 | * @param unknown_type $errline |
| 401 | 407 | * @param unknown_type $errcontext |
| 408 | + * @param string $errtype |
|
| 402 | 409 | */ |
| 403 | 410 | public static function showError($errno, $errstr, $errfile, $errline, $errcontext, $errtype) { |
| 404 | 411 | if(!headers_sent()) { |