jobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`
[lhc/web/wiklou.git] / includes / FauxRequest.php
index c2108f2..ecbc6e3 100644 (file)
@@ -39,7 +39,7 @@ class FauxRequest extends WebRequest {
         * @param array $data Array of *non*-urlencoded key => value pairs, the
         *   fake GET/POST values
         * @param bool $wasPosted Whether to treat the data as POST
-        * @param MediaWiki\\Session\\Session|array|null $session Session, session
+        * @param MediaWiki\Session\Session|array|null $session Session, session
         *  data array, or null
         * @param string $protocol 'http' or 'https'
         * @throws MWException
@@ -121,12 +121,12 @@ class FauxRequest extends WebRequest {
                        $prefix = $wgCookiePrefix;
                }
                $name = $prefix . $key;
-               return isset( $this->cookies[$name] ) ? $this->cookies[$name] : $default;
+               return $this->cookies[$name] ?? $default;
        }
 
        /**
         * @since 1.26
-        * @param string $name Unprefixed name of the cookie to set
+        * @param string $key Unprefixed name of the cookie to set
         * @param string|null $value Value of the cookie to set
         * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix
         */
@@ -152,6 +152,7 @@ class FauxRequest extends WebRequest {
 
        /**
         * @since 1.25
+        * @param string $url
         */
        public function setRequestURL( $url ) {
                $this->requestUrl = $url;
@@ -160,6 +161,7 @@ class FauxRequest extends WebRequest {
        /**
         * @since 1.25 MWException( "getRequestURL not implemented" )
         * no longer thrown.
+        * @return string
         */
        public function getRequestURL() {
                if ( $this->requestUrl === null ) {
@@ -226,6 +228,7 @@ class FauxRequest extends WebRequest {
        }
 
        /**
+        * @codeCoverageIgnore
         * @param array $extWhitelist
         * @return bool
         */
@@ -234,6 +237,7 @@ class FauxRequest extends WebRequest {
        }
 
        /**
+        * @codeCoverageIgnore
         * @return string
         */
        protected function getRawIP() {