From c13dfc2fa0d84fab40d01f38441295d40d2d1df5 Mon Sep 17 00:00:00 2001 From: Peter Thaleikis Date: Tue, 6 Oct 2015 18:28:04 +1300 Subject: [PATCH] fixing phpdoc blocks to refering to Objects to built-in types of PHP --- control/Controller.php | 6 +++--- control/Director.php | 2 +- control/HTTP.php | 10 +++++----- control/HTTPRequest.php | 2 +- control/HTTPResponse.php | 14 +++++++------- control/PjaxResponseNegotiator.php | 2 +- control/RequestHandler.php | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/control/Controller.php b/control/Controller.php index 8dde3d897..f2e5f31fd 100644 --- a/control/Controller.php +++ b/control/Controller.php @@ -315,7 +315,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider { * Removes all the "action" part of the current URL and returns the result. * If no action parameter is present, returns the full URL * @static - * @return String + * @return string */ public function removeAction($fullURL, $action = null) { if (!$action) $action = $this->getAction(); //default to current action @@ -555,8 +555,8 @@ class Controller extends RequestHandler implements TemplateGlobalProvider { * * Caution: All parameters are expected to be URI-encoded already. * - * @param String - * @return String + * @param string + * @return string */ public static function join_links() { $args = func_get_args(); diff --git a/control/Director.php b/control/Director.php index c98af9743..0601649b9 100644 --- a/control/Director.php +++ b/control/Director.php @@ -794,7 +794,7 @@ class Director implements TemplateGlobalProvider { /** * Takes a $_SERVER data array and extracts HTTP request headers. * - * @param array $server + * @param array $server * @return array */ public static function extract_request_headers(array $server) { diff --git a/control/HTTP.php b/control/HTTP.php index 106f47e72..7520162f8 100644 --- a/control/HTTP.php +++ b/control/HTTP.php @@ -158,11 +158,11 @@ class HTTP { * This method will always return an absolute URL because * Director::makeRelative() can lead to inconsistent results. * - * @param String $varname - * @param String $varvalue - * @param String $currentURL Relative or absolute URL (Optional). - * @param String $separator Separator for http_build_query(). (Optional). - * @return String Absolute URL + * @param string $varname + * @param string $varvalue + * @param string $currentURL Relative or absolute URL (Optional). + * @param string $separator Separator for http_build_query(). (Optional). + * @return string Absolute URL */ public static function setGetVar($varname, $varvalue, $currentURL = null, $separator = '&') { $uri = $currentURL ? $currentURL : Director::makeRelative($_SERVER['REQUEST_URI']); diff --git a/control/HTTPRequest.php b/control/HTTPRequest.php index 479041bae..87b30aa9a 100644 --- a/control/HTTPRequest.php +++ b/control/HTTPRequest.php @@ -620,7 +620,7 @@ class SS_HTTPRequest implements ArrayAccess { * If you specify shifting more than 1 item off, then the items will be returned as an array * * @param int $count Shift Count - * @return String|Array + * @return string|Array */ public function shift($count = 1) { $return = array(); diff --git a/control/HTTPResponse.php b/control/HTTPResponse.php index 14e04d0c9..4f73fb407 100644 --- a/control/HTTPResponse.php +++ b/control/HTTPResponse.php @@ -66,12 +66,12 @@ class SS_HTTPResponse { ); /** - * @var Int + * @var int */ protected $statusCode = 200; /** - * @var String + * @var string */ protected $statusDescription = "OK"; @@ -104,8 +104,8 @@ class SS_HTTPResponse { } /** - * @param String $code - * @param String $description Optional. See {@link setStatusDescription()}. + * @param string $code + * @param string $description Optional. See {@link setStatusDescription()}. * No newlines are allowed in the description. * If omitted, will default to the standard HTTP description * for the given $code value (see {@link $status_codes}). @@ -124,7 +124,7 @@ class SS_HTTPResponse { * The text to be given alongside the status code ("reason phrase"). * Caution: Will be overwritten by {@link setStatusCode()}. * - * @param String $description + * @param string $description * @return SS_HTTPRequest $this */ public function setStatusDescription($description) { @@ -133,7 +133,7 @@ class SS_HTTPResponse { } /** - * @return Int + * @return int */ public function getStatusCode() { return $this->statusCode; @@ -312,7 +312,7 @@ class SS_HTTPResponse_Exception extends Exception { protected $response; /** - * @param string|SS_HTTPResponse body Either the plaintext content of the error message, or an SS_HTTPResponse + * @param string|SS_HTTPResponse body Either the plaintext content of the error message, or an SS_HTTPResponse * object representing it. In either case, the $statusCode and * $statusDescription will be the HTTP status of the resulting response. * @see SS_HTTPResponse::__construct(); diff --git a/control/PjaxResponseNegotiator.php b/control/PjaxResponseNegotiator.php index fa7782d41..bbbbc4e41 100644 --- a/control/PjaxResponseNegotiator.php +++ b/control/PjaxResponseNegotiator.php @@ -99,7 +99,7 @@ class PjaxResponseNegotiator { } /** - * @param String $fragment + * @param string $fragment * @param Callable $callback */ public function setCallback($fragment, $callback) { diff --git a/control/RequestHandler.php b/control/RequestHandler.php index 1cbb41f56..1e6769204 100644 --- a/control/RequestHandler.php +++ b/control/RequestHandler.php @@ -302,7 +302,7 @@ class RequestHandler extends ViewableData { * so it is recommended to use the $class argument * when invoking this method. * - * @param String $limitToClass + * @param string $limitToClass * @return array|null */ public function allowedActions($limitToClass = null) {