protected $msg;
/** @var array */
- protected $licenses = array();
+ protected $licenses = [];
/** @var string */
protected $html;
* @private
*/
protected function makeLicenses() {
- $levels = array();
+ $levels = [];
$lines = explode( "\n", $this->msg );
foreach ( $lines as $line ) {
*/
protected function trimStars( $str ) {
$numStars = strspn( $str, '*' );
- return array( $numStars, ltrim( substr( $str, $numStars ), ' ' ) );
+ return [ $numStars, ltrim( substr( $str, $numStars ), ' ' ) ];
}
/**
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
);
}
$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';
}
public $text;
/**
- * @param string $str license name??
+ * @param string $str License name??
*/
function __construct( $str ) {
list( $text, $template ) = explode( '|', strrev( $str ), 2 );