X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=f555c0f1b06f8c4f590eca6f056ea2834f126767;hb=72f1ed40c7c0b9b915f90495323207932c7a5d63;hp=d8281b015e55bce9caa9eb518787ada36be88600;hpb=be74c82f9a19f9fc5a0c771ec627b9aa9746089e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index d8281b015e..f555c0f1b0 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -178,17 +178,9 @@ class WebInstaller extends Installer { return $this->session; } - if ( isset( $session['happyPages'] ) ) { - $this->happyPages = $session['happyPages']; - } else { - $this->happyPages = []; - } + $this->happyPages = $session['happyPages'] ?? []; - if ( isset( $session['skippedPages'] ) ) { - $this->skippedPages = $session['skippedPages']; - } else { - $this->skippedPages = []; - } + $this->skippedPages = $session['skippedPages'] ?? []; $lowestUnhappy = $this->getLowestUnhappy(); @@ -468,11 +460,7 @@ class WebInstaller extends Installer { * @return array */ public function getSession( $name, $default = null ) { - if ( !isset( $this->session[$name] ) ) { - return $default; - } else { - return $this->session[$name]; - } + return $this->session[$name] ?? $default; } /** @@ -932,11 +920,7 @@ class WebInstaller extends Installer { if ( !isset( $params['labelAttribs'] ) ) { $params['labelAttribs'] = []; } - if ( isset( $params['rawtext'] ) ) { - $labelText = $params['rawtext']; - } else { - $labelText = $this->parse( wfMessage( $params['label'] )->text() ); - } + $labelText = $params['rawtext'] ?? $this->parse( wfMessage( $params['label'] )->text() ); return "
\n" . $params['help'] . @@ -978,11 +962,7 @@ class WebInstaller extends Installer { public function getRadioSet( $params ) { $items = $this->getRadioElements( $params ); - if ( !isset( $params['label'] ) ) { - $label = ''; - } else { - $label = $params['label']; - } + $label = $params['label'] ?? ''; if ( !isset( $params['controlName'] ) ) { $params['controlName'] = 'config_' . $params['var'];