if ( !preg_match( '!^https?://!', $url ) ) {
$url = 'http://unused' . $url;
}
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$a = parse_url( $url );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( $a ) {
$path = isset( $a['path'] ) ? $a['path'] : '';
*
* @since 1.28
* @param string $name
- * @param string|null $default Optional default
+ * @param string|null $default
* @return string|null
*/
public function getRawVal( $name, $default = null ) {
public function response() {
/* Lazy initialization of response object for this request */
if ( !is_object( $this->response ) ) {
- $class = ( $this instanceof FauxRequest ) ? 'FauxResponse' : 'WebResponse';
+ $class = ( $this instanceof FauxRequest ) ? FauxResponse::class : WebResponse::class;
$this->response = new $class();
}
return $this->response;