Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/199920
Change subject: Fix inline documentation in WebResponse
......................................................................
Fix inline documentation in WebResponse
Main reason to touch this file are the missing "null" types in the
documentation.
Change-Id: Ifab16c276efb3d8c4aa0a27d8d5106d4e3303794
---
M includes/WebResponse.php
1 file changed, 9 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/20/199920/1
diff --git a/includes/WebResponse.php b/includes/WebResponse.php
index f977c20..83ac51a 100644
--- a/includes/WebResponse.php
+++ b/includes/WebResponse.php
@@ -55,12 +55,12 @@
/**
* Set the browser cookie
- * @param string $name Name of cookie
- * @param string $value Value to give cookie
+ * @param string $name The name of the cookie.
+ * @param string $value The value to be stored in the cookie.
* @param int|null $expire Unix timestamp (in seconds) when the cookie
should expire.
* 0 (the default) causes it to expire $wgCookieExpiration
seconds from now.
* null causes it to be a session cookie.
- * @param array $options Assoc of additional cookie options:
+ * @param array|null $options Assoc of additional cookie options:
* prefix: string, name prefix ($wgCookiePrefix)
* domain: string, cookie domain ($wgCookieDomain)
* path: string, cookie path ($wgCookiePath)
@@ -164,7 +164,7 @@
/**
* @param string $key The name of the header to get (case insensitive).
- * @return string
+ * @return string|null The header value (if set); null otherwise.
*/
public function getHeader( $key ) {
$key = strtoupper( $key );
@@ -185,12 +185,10 @@
}
/**
- * @todo document. It just ignore optional parameters.
- *
- * @param string $name Name of cookie
- * @param string $value Value to give cookie
- * @param int $expire Number of seconds til cookie expires (Default: 0)
- * @param array $options Ignored
+ * @param string $name The name of the cookie.
+ * @param string $value The value to be stored in the cookie.
+ * @param int|null $expire Ignored in this faux subclass.
+ * @param array|null $options Ignored in this faux subclass.
*/
public function setcookie( $name, $value, $expire = 0, $options = null
) {
$this->cookies[$name] = $value;
@@ -198,7 +196,7 @@
/**
* @param string $name
- * @return string
+ * @return string|null
*/
public function getcookie( $name ) {
if ( isset( $this->cookies[$name] ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/199920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifab16c276efb3d8c4aa0a27d8d5106d4e3303794
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits