From: Aaron Schulz Date: Sun, 12 Feb 2017 02:12:42 +0000 (-0800) Subject: Fix assortment of IDEA warnings X-Git-Tag: 1.31.0-rc.0~4098 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=58ecdd060cc7208b42310d29bc05195ee3851c23;p=lhc%2Fweb%2Fwiklou.git Fix assortment of IDEA warnings Change-Id: I3fb482232483f37bf73ebbeb405056794109e618 --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 5fb83b3d18..167b7098bd 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -835,7 +835,7 @@ class InfoAction extends FormlessAction { $real_names = []; $user_names = []; $anon_ips = []; - $linkRenderer = MediaWikiServices::getLinkRenderer(); + $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); # Sift for real versus user names /** @var $user User */ diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index d8ed7a949c..5dcb756929 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1085,24 +1085,18 @@ class DatabaseOracle extends Database { } } - /** - * defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}'; - * - * @param resource $fp - * @param bool|string $lineCallback - * @param bool|callable $resultCallback - * @param string $fname - * @param bool|callable $inputCallback - * @return bool|string - */ - function sourceStream( $fp, $lineCallback = false, $resultCallback = false, - $fname = __METHOD__, $inputCallback = false ) { + function sourceStream( + $fp, + callable $lineCallback = null, + callable $resultCallback = null, + $fname = __METHOD__, callable $inputCallback = null + ) { $cmd = ''; $done = false; $dollarquote = false; $replacements = []; - + // Defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}'; while ( !feof( $fp ) ) { if ( $lineCallback ) { call_user_func( $lineCallback ); diff --git a/includes/filerepo/file/ForeignDBFile.php b/includes/filerepo/file/ForeignDBFile.php index c6c49b4ca4..f6f44e610a 100644 --- a/includes/filerepo/file/ForeignDBFile.php +++ b/includes/filerepo/file/ForeignDBFile.php @@ -120,10 +120,10 @@ class ForeignDBFile extends LocalFile { } /** - * @param bool|Language $lang Optional language to fetch description in. + * @param Language|null $lang Optional language to fetch description in. * @return string|false */ - function getDescriptionText( $lang = false ) { + function getDescriptionText( $lang = null ) { global $wgLang; if ( !$this->repo->fetchDescription ) { diff --git a/includes/widget/search/InterwikiSearchResultWidget.php b/includes/widget/search/InterwikiSearchResultWidget.php index 44229b83a5..6b51db5aed 100644 --- a/includes/widget/search/InterwikiSearchResultWidget.php +++ b/includes/widget/search/InterwikiSearchResultWidget.php @@ -81,6 +81,6 @@ class InterwikiSearchResultWidget implements SearchResultWidget { default: return "
{$link} {$redirect}
" . "
{$snippet}
"; - }; + } } }