Merge pull request #4656 from spekulatius/fixing-phpdoc-blocks

fixing phpdoc blocks to refering to Objects to built-in types of PHP
This commit is contained in:
Damian Mooyman 2015-10-07 16:00:24 +13:00
commit d6f3115276
7 changed files with 19 additions and 19 deletions

View File

@ -315,7 +315,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider {
* Removes all the "action" part of the current URL and returns the result. * Removes all the "action" part of the current URL and returns the result.
* If no action parameter is present, returns the full URL * If no action parameter is present, returns the full URL
* @static * @static
* @return String * @return string
*/ */
public function removeAction($fullURL, $action = null) { public function removeAction($fullURL, $action = null) {
if (!$action) $action = $this->getAction(); //default to current action 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. * Caution: All parameters are expected to be URI-encoded already.
* *
* @param String * @param string
* @return String * @return string
*/ */
public static function join_links() { public static function join_links() {
$args = func_get_args(); $args = func_get_args();

View File

@ -794,7 +794,7 @@ class Director implements TemplateGlobalProvider {
/** /**
* Takes a $_SERVER data array and extracts HTTP request headers. * Takes a $_SERVER data array and extracts HTTP request headers.
* *
* @param array $server * @param array $server
* @return array * @return array
*/ */
public static function extract_request_headers(array $server) { public static function extract_request_headers(array $server) {

View File

@ -158,11 +158,11 @@ class HTTP {
* This method will always return an absolute URL because * This method will always return an absolute URL because
* Director::makeRelative() can lead to inconsistent results. * Director::makeRelative() can lead to inconsistent results.
* *
* @param String $varname * @param string $varname
* @param String $varvalue * @param string $varvalue
* @param String $currentURL Relative or absolute URL (Optional). * @param string $currentURL Relative or absolute URL (Optional).
* @param String $separator Separator for http_build_query(). (Optional). * @param string $separator Separator for http_build_query(). (Optional).
* @return String Absolute URL * @return string Absolute URL
*/ */
public static function setGetVar($varname, $varvalue, $currentURL = null, $separator = '&') { public static function setGetVar($varname, $varvalue, $currentURL = null, $separator = '&') {
$uri = $currentURL ? $currentURL : Director::makeRelative($_SERVER['REQUEST_URI']); $uri = $currentURL ? $currentURL : Director::makeRelative($_SERVER['REQUEST_URI']);

View File

@ -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 * If you specify shifting more than 1 item off, then the items will be returned as an array
* *
* @param int $count Shift Count * @param int $count Shift Count
* @return String|Array * @return string|Array
*/ */
public function shift($count = 1) { public function shift($count = 1) {
$return = array(); $return = array();

View File

@ -66,12 +66,12 @@ class SS_HTTPResponse {
); );
/** /**
* @var Int * @var int
*/ */
protected $statusCode = 200; protected $statusCode = 200;
/** /**
* @var String * @var string
*/ */
protected $statusDescription = "OK"; protected $statusDescription = "OK";
@ -104,8 +104,8 @@ class SS_HTTPResponse {
} }
/** /**
* @param String $code * @param string $code
* @param String $description Optional. See {@link setStatusDescription()}. * @param string $description Optional. See {@link setStatusDescription()}.
* No newlines are allowed in the description. * No newlines are allowed in the description.
* If omitted, will default to the standard HTTP description * If omitted, will default to the standard HTTP description
* for the given $code value (see {@link $status_codes}). * 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"). * The text to be given alongside the status code ("reason phrase").
* Caution: Will be overwritten by {@link setStatusCode()}. * Caution: Will be overwritten by {@link setStatusCode()}.
* *
* @param String $description * @param string $description
* @return SS_HTTPRequest $this * @return SS_HTTPRequest $this
*/ */
public function setStatusDescription($description) { public function setStatusDescription($description) {
@ -133,7 +133,7 @@ class SS_HTTPResponse {
} }
/** /**
* @return Int * @return int
*/ */
public function getStatusCode() { public function getStatusCode() {
return $this->statusCode; return $this->statusCode;
@ -312,7 +312,7 @@ class SS_HTTPResponse_Exception extends Exception {
protected $response; 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 * object representing it. In either case, the $statusCode and
* $statusDescription will be the HTTP status of the resulting response. * $statusDescription will be the HTTP status of the resulting response.
* @see SS_HTTPResponse::__construct(); * @see SS_HTTPResponse::__construct();

View File

@ -99,7 +99,7 @@ class PjaxResponseNegotiator {
} }
/** /**
* @param String $fragment * @param string $fragment
* @param Callable $callback * @param Callable $callback
*/ */
public function setCallback($fragment, $callback) { public function setCallback($fragment, $callback) {

View File

@ -302,7 +302,7 @@ class RequestHandler extends ViewableData {
* so it is recommended to use the $class argument * so it is recommended to use the $class argument
* when invoking this method. * when invoking this method.
* *
* @param String $limitToClass * @param string $limitToClass
* @return array|null * @return array|null
*/ */
public function allowedActions($limitToClass = null) { public function allowedActions($limitToClass = null) {