Remove Revision::getRevisionText from ApiQueryDeletedrevs
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 9e7dd8f..3b4e657 100644 (file)
@@ -1127,6 +1127,7 @@ function wfLogProfilingData() {
        if ( isset( $ctx['forwarded_for'] ) ||
                isset( $ctx['client_ip'] ) ||
                isset( $ctx['from'] ) ) {
+               // @phan-suppress-next-line PhanTypeArraySuspiciousNullable
                $ctx['proxy'] = $_SERVER['REMOTE_ADDR'];
        }
 
@@ -1815,10 +1816,11 @@ function mimeTypeMatch( $type, $avail ) {
  *
  * @param array $cprefs Client's acceptable type list
  * @param array $sprefs Server's offered types
- * @return string
+ * @return string|null
  *
  * @todo FIXME: Doesn't handle params like 'text/plain; charset=UTF-8'
  * XXX: generalize to negotiate other stuff
+ * @todo The function appears unused. Is it worth to keep?
  */
 function wfNegotiateType( $cprefs, $sprefs ) {
        $combine = [];
@@ -2115,6 +2117,7 @@ function wfEscapeShellArg( ...$args ) {
  *     including errors from limit.sh
  *   - profileMethod: By default this function will profile based on the calling
  *     method. Set this to a string for an alternative method to profile from
+ * @phan-param array{duplicateStderr?:bool,profileMethod?:string} $options
  *
  * @return string Collected stdout as a string
  * @deprecated since 1.30 use class MediaWiki\Shell\Shell
@@ -2189,6 +2192,7 @@ function wfShellExecWithStderr( $cmd, &$retval = null, $environ = [], $limits =
  * @param array $options Associative array of options:
  *     'php': The path to the php executable
  *     'wrapper': Path to a PHP wrapper to handle the maintenance script
+ * @phan-param array{php?:string,wrapper?:string} $options
  * @return string
  */
 function wfShellWikiCmd( $script, array $parameters = [], array $options = [] ) {
@@ -2892,7 +2896,6 @@ function wfUnpack( $format, $data, $length = false ) {
        $result = unpack( $format, $data );
        Wikimedia\restoreWarnings();
 
-       // @phan-suppress-next-line PhanTypeComparisonFromArray Phan issue #3160
        if ( $result === false ) {
                // If it cannot extract the packed data.
                throw new MWException( "unpack could not unpack binary data" );