Add null to @return tags if a method can return null
Change-Id: I420998351663d92c4a101f61842e40591eebcd5f
This commit is contained in:
parent
d21c75418d
commit
56d2a644f7
10 changed files with 15 additions and 15 deletions
|
|
@ -530,7 +530,7 @@ class Title {
|
||||||
* @param string $title Database key form
|
* @param string $title Database key form
|
||||||
* @param string $fragment The link fragment (after the "#")
|
* @param string $fragment The link fragment (after the "#")
|
||||||
* @param string $interwiki Interwiki prefix
|
* @param string $interwiki Interwiki prefix
|
||||||
* @return Title The new object, or null on an error
|
* @return Title|null The new object, or null on an error
|
||||||
*/
|
*/
|
||||||
public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
|
public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
|
||||||
if ( !MWNamespace::exists( $ns ) ) {
|
if ( !MWNamespace::exists( $ns ) ) {
|
||||||
|
|
|
||||||
|
|
@ -935,7 +935,7 @@ class User implements IDBAccessObject {
|
||||||
* the cached User object, we assume that whatever mechanism is setting
|
* the cached User object, we assume that whatever mechanism is setting
|
||||||
* the expiration date is also expiring the User cache.
|
* the expiration date is also expiring the User cache.
|
||||||
* @since 1.23
|
* @since 1.23
|
||||||
* @return string|bool The datestamp of the expiration, or null if not set
|
* @return string|null The datestamp of the expiration, or null if not set
|
||||||
*/
|
*/
|
||||||
public function getPasswordExpireDate() {
|
public function getPasswordExpireDate() {
|
||||||
$this->load();
|
$this->load();
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,7 @@ class ApiModuleManager extends ContextSource {
|
||||||
/**
|
/**
|
||||||
* Returns the group name for the given module
|
* Returns the group name for the given module
|
||||||
* @param string $moduleName
|
* @param string $moduleName
|
||||||
* @return string Group name or null if missing
|
* @return string|null Group name or null if missing
|
||||||
*/
|
*/
|
||||||
public function getModuleGroup( $moduleName ) {
|
public function getModuleGroup( $moduleName ) {
|
||||||
if ( isset( $this->mModules[$moduleName] ) ) {
|
if ( isset( $this->mModules[$moduleName] ) ) {
|
||||||
|
|
|
||||||
2
includes/cache/MessageBlobStore.php
vendored
2
includes/cache/MessageBlobStore.php
vendored
|
|
@ -167,7 +167,7 @@ class MessageBlobStore {
|
||||||
* @param string $name Module name
|
* @param string $name Module name
|
||||||
* @param ResourceLoaderModule $module
|
* @param ResourceLoaderModule $module
|
||||||
* @param string $lang Language code
|
* @param string $lang Language code
|
||||||
* @return string Regenerated message blob, or null if there was no blob for
|
* @return string|null Regenerated message blob, or null if there was no blob for
|
||||||
* the given module/language pair.
|
* the given module/language pair.
|
||||||
*/
|
*/
|
||||||
public function updateModule( $name, ResourceLoaderModule $module, $lang ) {
|
public function updateModule( $name, ResourceLoaderModule $module, $lang ) {
|
||||||
|
|
|
||||||
|
|
@ -574,7 +574,7 @@ abstract class File implements IDBAccessObject {
|
||||||
* In files that support multiple language, what is the default language
|
* In files that support multiple language, what is the default language
|
||||||
* to use if none specified.
|
* to use if none specified.
|
||||||
*
|
*
|
||||||
* @return string Lang code, or null if filetype doesn't support multiple languages.
|
* @return string|null Lang code, or null if filetype doesn't support multiple languages.
|
||||||
* @since 1.23
|
* @since 1.23
|
||||||
*/
|
*/
|
||||||
public function getDefaultRenderLanguage() {
|
public function getDefaultRenderLanguage() {
|
||||||
|
|
@ -922,7 +922,7 @@ abstract class File implements IDBAccessObject {
|
||||||
*
|
*
|
||||||
* @param array $params Handler-specific parameters
|
* @param array $params Handler-specific parameters
|
||||||
* @param int $flags Bitfield that supports THUMB_* constants
|
* @param int $flags Bitfield that supports THUMB_* constants
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function thumbName( $params, $flags = 0 ) {
|
public function thumbName( $params, $flags = 0 ) {
|
||||||
$name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
|
$name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
|
||||||
|
|
@ -937,7 +937,7 @@ abstract class File implements IDBAccessObject {
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array $params Parameters which will be passed to MediaHandler::makeParamString
|
* @param array $params Parameters which will be passed to MediaHandler::makeParamString
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function generateThumbName( $name, $params ) {
|
public function generateThumbName( $name, $params ) {
|
||||||
if ( !$this->getHandler() ) {
|
if ( !$this->getHandler() ) {
|
||||||
|
|
|
||||||
|
|
@ -1421,7 +1421,7 @@ class WikiPage implements Page, IDBAccessObject {
|
||||||
* @param string $edittime Revision timestamp or null to use the current revision.
|
* @param string $edittime Revision timestamp or null to use the current revision.
|
||||||
*
|
*
|
||||||
* @throws MWException
|
* @throws MWException
|
||||||
* @return string New complete article text, or null if error.
|
* @return string|null New complete article text, or null if error.
|
||||||
*
|
*
|
||||||
* @deprecated since 1.21, use replaceSectionAtRev() instead
|
* @deprecated since 1.21, use replaceSectionAtRev() instead
|
||||||
*/
|
*/
|
||||||
|
|
@ -1473,7 +1473,7 @@ class WikiPage implements Page, IDBAccessObject {
|
||||||
* @param string $edittime Revision timestamp or null to use the current revision.
|
* @param string $edittime Revision timestamp or null to use the current revision.
|
||||||
*
|
*
|
||||||
* @throws MWException
|
* @throws MWException
|
||||||
* @return Content New complete article content, or null if error.
|
* @return Content|null New complete article content, or null if error.
|
||||||
*
|
*
|
||||||
* @since 1.21
|
* @since 1.21
|
||||||
* @deprecated since 1.24, use replaceSectionAtRev instead
|
* @deprecated since 1.24, use replaceSectionAtRev instead
|
||||||
|
|
@ -1512,7 +1512,7 @@ class WikiPage implements Page, IDBAccessObject {
|
||||||
* @param int|null $baseRevId
|
* @param int|null $baseRevId
|
||||||
*
|
*
|
||||||
* @throws MWException
|
* @throws MWException
|
||||||
* @return Content New complete article content, or null if error.
|
* @return Content|null New complete article content, or null if error.
|
||||||
*
|
*
|
||||||
* @since 1.24
|
* @since 1.24
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ class SearchResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Title Title object for the redirect to this page, null if none or not supported
|
* @return Title|null Title object for the redirect to this page, null if none or not supported
|
||||||
*/
|
*/
|
||||||
function getRedirectTitle() {
|
function getRedirectTitle() {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -179,7 +179,7 @@ class SearchResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Title Title object (pagename+fragment) for the section, null if none or not supported
|
* @return Title|null Title object (pagename+fragment) for the section, null if none or not supported
|
||||||
*/
|
*/
|
||||||
function getSectionTitle() {
|
function getSectionTitle() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class SearchResultSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string Suggested query, null if none
|
* @return string|null Suggested query, null if none
|
||||||
*/
|
*/
|
||||||
function getSuggestionQuery() {
|
function getSuggestionQuery() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -625,7 +625,7 @@ class UploadStashFile extends UnregisteredLocalFile {
|
||||||
*
|
*
|
||||||
* @param array $params Handler-specific parameters
|
* @param array $params Handler-specific parameters
|
||||||
* @param int $flags Bitfield that supports THUMB_* constants
|
* @param int $flags Bitfield that supports THUMB_* constants
|
||||||
* @return string Base name for URL, like '120px-12345.jpg', or null if there is no handler
|
* @return string|null Base name for URL, like '120px-12345.jpg', or null if there is no handler
|
||||||
*/
|
*/
|
||||||
function thumbName( $params, $flags = 0 ) {
|
function thumbName( $params, $flags = 0 ) {
|
||||||
return $this->generateThumbName( $this->getUrlName(), $params );
|
return $this->generateThumbName( $this->getUrlName(), $params );
|
||||||
|
|
|
||||||
|
|
@ -659,7 +659,7 @@ class IP {
|
||||||
* unusual representations may be added later.
|
* unusual representations may be added later.
|
||||||
*
|
*
|
||||||
* @param string $addr Something that might be an IP address
|
* @param string $addr Something that might be an IP address
|
||||||
* @return string Valid dotted quad IPv4 address or null
|
* @return string|null Valid dotted quad IPv4 address or null
|
||||||
*/
|
*/
|
||||||
public static function canonicalize( $addr ) {
|
public static function canonicalize( $addr ) {
|
||||||
// remove zone info (bug 35738)
|
// remove zone info (bug 35738)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue