X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FLicenses.php;h=da1a8da6b02d490cd57661797ed2707c6a10ed7c;hp=0bcbc91b2216eb30bf5da18190d3dc30a6006be0;hb=eb66028ef049fff2f2379a8b5a1a5ede0fb43cb5;hpb=25b73462a10fa359e917926cab49bf9bc5575ee5 diff --git a/includes/Licenses.php b/includes/Licenses.php index 0bcbc91b22..da1a8da6b0 100644 --- a/includes/Licenses.php +++ b/includes/Licenses.php @@ -32,7 +32,7 @@ class Licenses extends HTMLFormField { protected $msg; /** @var array */ - protected $licenses = array(); + protected $licenses = []; /** @var string */ protected $html; @@ -56,7 +56,7 @@ class Licenses extends HTMLFormField { * @private */ protected function makeLicenses() { - $levels = array(); + $levels = []; $lines = explode( "\n", $this->msg ); foreach ( $lines as $line ) { @@ -88,7 +88,7 @@ class Licenses extends HTMLFormField { */ protected function trimStars( $str ) { $numStars = strspn( $str, '*' ); - return array( $numStars, ltrim( substr( $str, $numStars ), ' ' ) ); + return [ $numStars, ltrim( substr( $str, $numStars ), ' ' ) ]; } /** @@ -115,17 +115,17 @@ class Licenses extends HTMLFormField { if ( is_array( $val ) ) { $this->html .= $this->outputOption( $key, '', - array( + [ 'disabled' => 'disabled', 'style' => 'color: GrayText', // for MSIE - ), + ], $depth ); $this->makeHtml( $val, $depth + 1 ); } else { $this->html .= $this->outputOption( $val->text, $val->template, - array( 'title' => '{{' . $val->template . '}}' ), + [ 'title' => '{{' . $val->template . '}}' ], $depth ); } @@ -173,13 +173,13 @@ class Licenses extends HTMLFormField { $this->selected = $value; $this->html = $this->outputOption( wfMessage( 'nolicense' )->text(), '', - (bool)$this->selected ? null : array( 'selected' => 'selected' ) ); + (bool)$this->selected ? null : [ 'selected' => 'selected' ] ); $this->makeHtml( $this->getLicenses() ); - $attribs = array( + $attribs = [ 'name' => $this->mName, 'id' => $this->mID - ); + ]; if ( !empty( $this->mParams['disabled'] ) ) { $attibs['disabled'] = 'disabled'; }