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 $fragment The link fragment (after the "#")
|
||||
* @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 = '' ) {
|
||||
if ( !MWNamespace::exists( $ns ) ) {
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ class User implements IDBAccessObject {
|
|||
* the cached User object, we assume that whatever mechanism is setting
|
||||
* the expiration date is also expiring the User cache.
|
||||
* @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() {
|
||||
$this->load();
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class ApiModuleManager extends ContextSource {
|
|||
/**
|
||||
* Returns the group name for the given module
|
||||
* @param string $moduleName
|
||||
* @return string Group name or null if missing
|
||||
* @return string|null Group name or null if missing
|
||||
*/
|
||||
public function getModuleGroup( $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 ResourceLoaderModule $module
|
||||
* @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.
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
*/
|
||||
public function getDefaultRenderLanguage() {
|
||||
|
|
@ -922,7 +922,7 @@ abstract class File implements IDBAccessObject {
|
|||
*
|
||||
* @param array $params Handler-specific parameters
|
||||
* @param int $flags Bitfield that supports THUMB_* constants
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function thumbName( $params, $flags = 0 ) {
|
||||
$name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
|
||||
|
|
@ -937,7 +937,7 @@ abstract class File implements IDBAccessObject {
|
|||
*
|
||||
* @param string $name
|
||||
* @param array $params Parameters which will be passed to MediaHandler::makeParamString
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function generateThumbName( $name, $params ) {
|
||||
if ( !$this->getHandler() ) {
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
* @param string $edittime Revision timestamp or null to use the current revision.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
|
|
@ -1473,7 +1473,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
* @param string $edittime Revision timestamp or null to use the current revision.
|
||||
*
|
||||
* @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
|
||||
* @deprecated since 1.24, use replaceSectionAtRev instead
|
||||
|
|
@ -1512,7 +1512,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
* @param int|null $baseRevId
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
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() {
|
||||
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() {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ class UploadStashFile extends UnregisteredLocalFile {
|
|||
*
|
||||
* @param array $params Handler-specific parameters
|
||||
* @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 ) {
|
||||
return $this->generateThumbName( $this->getUrlName(), $params );
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ class IP {
|
|||
* unusual representations may be added later.
|
||||
*
|
||||
* @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 ) {
|
||||
// remove zone info (bug 35738)
|
||||
|
|
|
|||
Loading…
Reference in a new issue