* @return mixed
*/
public function getVar( $name, $default = null ) {
- if ( !isset( $this->settings[$name] ) ) {
- return $default;
- } else {
- return $this->settings[$name];
- }
+ return $this->settings[$name] ?? $default;
}
/**
'enableSectionEditLinks' => false,
'unwrap' => true,
] );
- } catch ( MediaWiki\Services\ServiceDisabledException $e ) {
+ } catch ( Wikimedia\Services\ServiceDisabledException $e ) {
$html = '<!--DB access attempted during parse--> ' . htmlspecialchars( $text );
}
/**
* Installs the auto-detected extensions.
*
+ * @suppress SecurityCheck-OTHER It thinks $exts/$IP is user controlled but they are not.
* @return Status
*/
protected function includeExtensions() {
$data = $registry->readFromQueue( $queue );
$wgAutoloadClasses += $data['autoload'];
- $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?
- /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */
- $wgHooks['LoadExtensionSchemaUpdates'] : [];
+ /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */
+ $hooksWeWant = $wgHooks['LoadExtensionSchemaUpdates'] ?? [];
if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
$hooksWeWant = array_merge_recursive(