@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | /** |
| 1067 | 1067 | * Find objects in the given relationships, merging them into the given list |
| 1068 | 1068 | * |
| 1069 | - * @param array $source Config property to extract relationships from |
|
| 1069 | + * @param string $source Config property to extract relationships from |
|
| 1070 | 1070 | * @param bool $recursive True if recursive |
| 1071 | 1071 | * @param ArrayList $list Optional list to add items to |
| 1072 | 1072 | * @return ArrayList The list |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | /** |
| 1187 | 1187 | * Check if the current user can delete this record from live |
| 1188 | 1188 | * |
| 1189 | - * @param null $member |
|
| 1189 | + * @param Member|null $member |
|
| 1190 | 1190 | * @return mixed |
| 1191 | 1191 | */ |
| 1192 | 1192 | public function canUnpublish($member = null) { |
@@ -1219,7 +1219,7 @@ discard block |
||
| 1219 | 1219 | * If extended, ensure that both canDelete and canUnpublish are extended also |
| 1220 | 1220 | * |
| 1221 | 1221 | * @param Member $member |
| 1222 | - * @return bool |
|
| 1222 | + * @return null|boolean |
|
| 1223 | 1223 | */ |
| 1224 | 1224 | public function canArchive($member = null) { |
| 1225 | 1225 | // Skip if invoked by extendedCan() |
@@ -1296,7 +1296,7 @@ discard block |
||
| 1296 | 1296 | * Extend permissions to include additional security for objects that are not published to live. |
| 1297 | 1297 | * |
| 1298 | 1298 | * @param Member $member |
| 1299 | - * @return bool|null |
|
| 1299 | + * @return false|null |
|
| 1300 | 1300 | */ |
| 1301 | 1301 | public function canView($member = null) { |
| 1302 | 1302 | // Invoke default version-gnostic canView |
@@ -1918,7 +1918,7 @@ discard block |
||
| 1918 | 1918 | /** |
| 1919 | 1919 | * Determine if the current user is able to set the given site stage / archive |
| 1920 | 1920 | * |
| 1921 | - * @param SS_HTTPRequest $request |
|
| 1921 | + * @param SilverStripe\Control\HTTPRequest $request |
|
| 1922 | 1922 | * @return bool |
| 1923 | 1923 | */ |
| 1924 | 1924 | public static function can_choose_site_stage($request) { |
@@ -2422,7 +2422,7 @@ discard block |
||
| 2422 | 2422 | /** |
| 2423 | 2423 | * Returns an array of possible stages. |
| 2424 | 2424 | * |
| 2425 | - * @return array |
|
| 2425 | + * @return string[] |
|
| 2426 | 2426 | */ |
| 2427 | 2427 | public function getVersionedStages() { |
| 2428 | 2428 | if($this->hasStages()) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * Constructor |
| 15 | 15 | * |
| 16 | - * @param Controller $controller The parent controller, necessary to |
|
| 16 | + * @param Controller|null $controller The parent controller, necessary to |
|
| 17 | 17 | * create the appropriate form action tag. |
| 18 | 18 | * @param string $name The method on the controller that will return this |
| 19 | 19 | * form object. |
@@ -188,7 +188,7 @@ |
||
| 188 | 188 | * |
| 189 | 189 | * @param int $code HTTP code |
| 190 | 190 | * @param string $body Body expected for 200 responses |
| 191 | - * @param SS_HTTPResponse $response |
|
| 191 | + * @param HTTPResponse $response |
|
| 192 | 192 | */ |
| 193 | 193 | protected function assertResponseEquals($code, $body, HTTPResponse $response) { |
| 194 | 194 | $this->assertEquals($code, $response->getStatusCode()); |
@@ -68,6 +68,7 @@ discard block |
||
| 68 | 68 | * while automatically busting this cache every time the file is changed. |
| 69 | 69 | * |
| 70 | 70 | * @param bool |
| 71 | + * @param boolean $var |
|
| 71 | 72 | */ |
| 72 | 73 | public static function set_suffix_requirements($var) { |
| 73 | 74 | self::backend()->setSuffixRequirements($var); |
@@ -276,7 +277,7 @@ discard block |
||
| 276 | 277 | * Attach requirements inclusion to X-Include-JS and X-Include-CSS headers on the given |
| 277 | 278 | * HTTP Response |
| 278 | 279 | * |
| 279 | - * @param SS_HTTPResponse $response |
|
| 280 | + * @param HTTPResponse $response |
|
| 280 | 281 | */ |
| 281 | 282 | public static function include_in_response(HTTPResponse $response) { |
| 282 | 283 | self::backend()->includeInResponse($response); |
@@ -339,7 +340,7 @@ discard block |
||
| 339 | 340 | * </code> |
| 340 | 341 | * |
| 341 | 342 | * @param string $combinedFileName Filename of the combined file relative to docroot |
| 342 | - * @param array $files Array of filenames relative to docroot |
|
| 343 | + * @param string[] $files Array of filenames relative to docroot |
|
| 343 | 344 | * @param string $media |
| 344 | 345 | * |
| 345 | 346 | * @return bool|void |
@@ -764,6 +765,7 @@ discard block |
||
| 764 | 765 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
| 765 | 766 | * |
| 766 | 767 | * @param bool |
| 768 | + * @param boolean $var |
|
| 767 | 769 | * @return $this |
| 768 | 770 | */ |
| 769 | 771 | public function setForceJSToBottom($var) { |
@@ -1263,7 +1265,7 @@ discard block |
||
| 1263 | 1265 | * Attach requirements inclusion to X-Include-JS and X-Include-CSS headers on the given |
| 1264 | 1266 | * HTTP Response |
| 1265 | 1267 | * |
| 1266 | - * @param SS_HTTPResponse $response |
|
| 1268 | + * @param HTTPResponse $response |
|
| 1267 | 1269 | */ |
| 1268 | 1270 | public function includeInResponse(HTTPResponse $response) { |
| 1269 | 1271 | $this->processCombinedFiles(); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | /** |
| 195 | 195 | * REST endpoint to get a list of campaigns. |
| 196 | 196 | * |
| 197 | - * @param SS_HTTPRequest $request |
|
| 197 | + * @param HTTPRequest $request |
|
| 198 | 198 | * |
| 199 | 199 | * @return HTTPResponse |
| 200 | 200 | */ |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | /** |
| 336 | 336 | * Gets viewable list of campaigns |
| 337 | 337 | * |
| 338 | - * @return SS_List |
|
| 338 | + * @return SilverStripe\Model\ArrayList |
|
| 339 | 339 | */ |
| 340 | 340 | protected function getListItems() { |
| 341 | 341 | return ChangeSet::get() |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | /** |
| 350 | 350 | * REST endpoint to get a campaign. |
| 351 | 351 | * |
| 352 | - * @param SS_HTTPRequest $request |
|
| 352 | + * @param HTTPRequest $request |
|
| 353 | 353 | * |
| 354 | 354 | * @return HTTPResponse |
| 355 | 355 | */ |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | /** |
| 383 | 383 | * REST endpoint to delete a campaign. |
| 384 | 384 | * |
| 385 | - * @param SS_HTTPRequest $request |
|
| 385 | + * @param HTTPRequest $request |
|
| 386 | 386 | * |
| 387 | 387 | * @return HTTPResponse |
| 388 | 388 | */ |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | /** |
| 410 | 410 | * REST endpoint to publish a {@link ChangeSet} and all of its items. |
| 411 | 411 | * |
| 412 | - * @param SS_HTTPRequest $request |
|
| 412 | + * @param HTTPRequest $request |
|
| 413 | 413 | * |
| 414 | 414 | * @return HTTPResponse |
| 415 | 415 | */ |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * $this->pushCurrent() and end the method with $this->popCurrent(). Failure to do this will create |
| 144 | 144 | * weird session errors. |
| 145 | 145 | * |
| 146 | - * @param SS_HTTPRequest $request |
|
| 146 | + * @param HTTPRequest $request |
|
| 147 | 147 | * @param DataModel $model |
| 148 | 148 | * |
| 149 | 149 | * @return HTTPResponse |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | /** |
| 282 | 282 | * Sets the SS_HTTPResponse object that this controller is building up. |
| 283 | 283 | * |
| 284 | - * @param SS_HTTPResponse $response |
|
| 284 | + * @param HTTPResponse $response |
|
| 285 | 285 | * |
| 286 | 286 | * @return $this |
| 287 | 287 | */ |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | * |
| 323 | 323 | * @param string $action |
| 324 | 324 | * |
| 325 | - * @return HTMLText |
|
| 325 | + * @return \SilverStripe\Model\FieldType\DBField |
|
| 326 | 326 | */ |
| 327 | 327 | public function defaultAction($action) { |
| 328 | 328 | return $this->getViewer($action)->process($this); |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | * |
| 459 | 459 | * @param array $params |
| 460 | 460 | * |
| 461 | - * @return string |
|
| 461 | + * @return \SilverStripe\Model\FieldType\DBField |
|
| 462 | 462 | */ |
| 463 | 463 | public function render($params = null) { |
| 464 | 464 | $template = $this->getViewer($this->getAction()); |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
| 624 | 624 | * the URL redirected to. Otherwise, it will return null. |
| 625 | 625 | * |
| 626 | - * @return null|string |
|
| 626 | + * @return boolean |
|
| 627 | 627 | */ |
| 628 | 628 | public function redirectedTo() { |
| 629 | 629 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * @param array|Cookie_Backend $cookies to populate $_COOKIE. |
| 279 | 279 | * @param HTTP_Request $request The {@see HTTP_Request} object generated as a part of this request. |
| 280 | 280 | * |
| 281 | - * @return SilverStripe\Control\HTTPResponse |
|
| 281 | + * @return HTTPResponse |
|
| 282 | 282 | * |
| 283 | 283 | * @throws SilverStripe\Control\HTTPResponse_Exception |
| 284 | 284 | */ |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | /** |
| 415 | 415 | * Handle an HTTP request, defined with a SS_HTTPRequest object. |
| 416 | 416 | * |
| 417 | - * @param SS_HTTPRequest $request |
|
| 417 | + * @param HTTPRequest $request |
|
| 418 | 418 | * @param Session $session |
| 419 | 419 | * @param DataModel $model |
| 420 | 420 | * |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | * Returns the domain part of the URL 'http://www.mysite.com'. Returns FALSE is this environment |
| 561 | 561 | * variable isn't set. |
| 562 | 562 | * |
| 563 | - * @return bool|string |
|
| 563 | + * @return string|false |
|
| 564 | 564 | */ |
| 565 | 565 | public static function protocolAndHost() { |
| 566 | 566 | $alternate = Config::inst()->get('SilverStripe\Control\Director', 'alternate_base_url'); |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | /** |
| 894 | 894 | * Returns true if the given file exists. Filename should be relative to the site root. |
| 895 | 895 | * |
| 896 | - * @param $file |
|
| 896 | + * @param string $file |
|
| 897 | 897 | * |
| 898 | 898 | * @return bool |
| 899 | 899 | */ |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | * Can also be checked with {@link Director::isDev()}, {@link Director::isTest()}, and |
| 1112 | 1112 | * {@link Director::isLive()}. |
| 1113 | 1113 | * |
| 1114 | - * @return bool|string |
|
| 1114 | + * @return string|false |
|
| 1115 | 1115 | */ |
| 1116 | 1116 | public static function get_environment_type() { |
| 1117 | 1117 | if (Director::isLive()) { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * |
| 132 | 132 | * @param string The new URL |
| 133 | 133 | * |
| 134 | - * @return SS_HTTPRequest The updated request |
|
| 134 | + * @return HTTPRequest The updated request |
|
| 135 | 135 | */ |
| 136 | 136 | public function setUrl($url) { |
| 137 | 137 | $this->url = $url; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | /** |
| 189 | 189 | * @param string $body |
| 190 | - * @return SS_HTTPRequest $this |
|
| 190 | + * @return HTTPRequest $this |
|
| 191 | 191 | */ |
| 192 | 192 | public function setBody($body) { |
| 193 | 193 | $this->body = $body; |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | /** |
| 198 | - * @return null|string |
|
| 198 | + * @return string |
|
| 199 | 199 | */ |
| 200 | 200 | public function getBody() { |
| 201 | 201 | return $this->body; |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | /** |
| 246 | 246 | * @param string $name |
| 247 | - * @return mixed |
|
| 247 | + * @return string |
|
| 248 | 248 | */ |
| 249 | 249 | public function requestVar($name) { |
| 250 | 250 | if(isset($this->postVars[$name])) return $this->postVars[$name]; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | * Remove an existing HTTP header |
| 298 | 298 | * |
| 299 | 299 | * @param string $header |
| 300 | - * @return mixed |
|
| 300 | + * @return string |
|
| 301 | 301 | */ |
| 302 | 302 | public function getHeader($header) { |
| 303 | 303 | return (isset($this->headers[$header])) ? $this->headers[$header] : null; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | * e.g. "Content-Type". |
| 309 | 309 | * |
| 310 | 310 | * @param string $header |
| 311 | - * @return SS_HTTPRequest $this |
|
| 311 | + * @return HTTPRequest $this |
|
| 312 | 312 | */ |
| 313 | 313 | public function removeHeader($header) { |
| 314 | 314 | if(isset($this->headers[$header])) unset($this->headers[$header]); |
@@ -394,9 +394,9 @@ discard block |
||
| 394 | 394 | * it's only advisable to send small files through this method. |
| 395 | 395 | * |
| 396 | 396 | * @static |
| 397 | - * @param $fileData |
|
| 397 | + * @param string $fileData |
|
| 398 | 398 | * @param $fileName |
| 399 | - * @param null $mimeType |
|
| 399 | + * @param string $mimeType |
|
| 400 | 400 | * @return HTTPResponse |
| 401 | 401 | */ |
| 402 | 402 | public static function send_file($fileData, $fileName, $mimeType = null) { |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | |
| 572 | 572 | /** |
| 573 | 573 | * @param $params |
| 574 | - * @return SS_HTTPRequest $this |
|
| 574 | + * @return HTTPRequest $this |
|
| 575 | 575 | */ |
| 576 | 576 | public function setRouteParams($params) { |
| 577 | 577 | $this->routeParams = $params; |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | * This is used by the request handler to prevent infinite parsing loops. |
| 615 | 615 | * |
| 616 | 616 | * @param $pattern |
| 617 | - * @return bool |
|
| 617 | + * @return boolean|null |
|
| 618 | 618 | */ |
| 619 | 619 | public function isEmptyPattern($pattern) { |
| 620 | 620 | if(preg_match('/^([A-Za-z]+) +(.*)$/', $pattern, $matches)) { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * No newlines are allowed in the description. |
| 121 | 121 | * If omitted, will default to the standard HTTP description |
| 122 | 122 | * for the given $code value (see {@link $status_codes}). |
| 123 | - * @return SS_HTTPRequest $this |
|
| 123 | + * @return HTTPResponse $this |
|
| 124 | 124 | */ |
| 125 | 125 | public function setStatusCode($code, $description = null) { |
| 126 | 126 | if(isset(self::$status_codes[$code])) $this->statusCode = $code; |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * Caution: Will be overwritten by {@link setStatusCode()}. |
| 137 | 137 | * |
| 138 | 138 | * @param string $description |
| 139 | - * @return SS_HTTPRequest $this |
|
| 139 | + * @return HTTPResponse $this |
|
| 140 | 140 | */ |
| 141 | 141 | public function setStatusDescription($description) { |
| 142 | 142 | $this->statusDescription = $description; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | /** |
| 170 | 170 | * @param string $body |
| 171 | - * @return SS_HTTPRequest $this |
|
| 171 | + * @return HTTPResponse $this |
|
| 172 | 172 | */ |
| 173 | 173 | public function setBody($body) { |
| 174 | 174 | $this->body = $body ? (string) $body : $body; // Don't type-cast false-ish values, eg null is null not '' |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | - * @return null|string |
|
| 179 | + * @return string |
|
| 180 | 180 | */ |
| 181 | 181 | public function getBody() { |
| 182 | 182 | return $this->body; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * |
| 188 | 188 | * @param string $header Example: "Content-Type" |
| 189 | 189 | * @param string $value Example: "text/xml" |
| 190 | - * @return SS_HTTPRequest $this |
|
| 190 | + * @return HTTPResponse $this |
|
| 191 | 191 | */ |
| 192 | 192 | public function addHeader($header, $value) { |
| 193 | 193 | $this->headers[$header] = $value; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * e.g. "Content-Type". |
| 218 | 218 | * |
| 219 | 219 | * @param string $header |
| 220 | - * @return SS_HTTPRequest $this |
|
| 220 | + * @return HTTPResponse $this |
|
| 221 | 221 | */ |
| 222 | 222 | public function removeHeader($header) { |
| 223 | 223 | if(isset($this->headers[$header])) unset($this->headers[$header]); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | /** |
| 228 | 228 | * @param string $dest |
| 229 | 229 | * @param int $code |
| 230 | - * @return SS_HTTPRequest $this |
|
| 230 | + * @return HTTPResponse $this |
|
| 231 | 231 | */ |
| 232 | 232 | public function redirect($dest, $code=302) { |
| 233 | 233 | if(!in_array($code, self::$redirect_codes)) $code = 302; |
@@ -327,6 +327,7 @@ discard block |
||
| 327 | 327 | * @param string|SS_HTTPResponse body Either the plaintext content of the error message, or an SS_HTTPResponse |
| 328 | 328 | * object representing it. In either case, the $statusCode and |
| 329 | 329 | * $statusDescription will be the HTTP status of the resulting response. |
| 330 | + * @param string $statusDescription |
|
| 330 | 331 | * @see SS_HTTPResponse::__construct(); |
| 331 | 332 | */ |
| 332 | 333 | public function __construct($body = null, $statusCode = null, $statusDescription = null) { |
@@ -356,7 +357,7 @@ discard block |
||
| 356 | 357 | } |
| 357 | 358 | |
| 358 | 359 | /** |
| 359 | - * @param SS_HTTPResponse $response |
|
| 360 | + * @param HTTPResponse $response |
|
| 360 | 361 | */ |
| 361 | 362 | public function setResponse(HTTPResponse $response) { |
| 362 | 363 | $this->response = $response; |