[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Convert to new array syntax

2016-12-03 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert to new array syntax
..


Convert to new array syntax

Change-Id: Ief04ee0d01ef4877def3daa5e62da21b494f44d3
---
M HieroTokenizer.php
M SpecialHieroglyphs.php
M data/tables.php
M generateTables.php
M wikihiero.body.php
5 files changed, 1,052 insertions(+), 1,052 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/HieroTokenizer.php b/HieroTokenizer.php
index e1f5cc7..6e97510 100644
--- a/HieroTokenizer.php
+++ b/HieroTokenizer.php
@@ -46,9 +46,9 @@
return;
}
 
-   self::$delimiters = array_flip( array( ' ', '-', "\t", "\n", 
"\r" ) );
-   self::$tokenDelimiters = array_flip( array( '*', ':', '(', ')' 
) );
-   self::$singleChars = array_flip( array( '!' ) );
+   self::$delimiters = array_flip( [ ' ', '-', "\t", "\n", "\r" ] 
);
+   self::$tokenDelimiters = array_flip( [ '*', ':', '(', ')' ] );
+   self::$singleChars = array_flip( [ '!' ] );
}
 
/**
@@ -61,8 +61,8 @@
return $this->blocks;
}
 
-   $this->blocks = array();
-   $this->currentBlock = array();
+   $this->blocks = [];
+   $this->currentBlock = [];
$this->token = '';
 
$text = preg_replace( '/\\', 'message' => 'wikihiero-comment', 
'example' => 'A1' ),
-   );
-   private $helpColumns = array(
+   private $syntaxHelp = [
+   [ 'code' => '-', 'message' => 'wikihiero-separator', 'example' 
=> 'A1 - B1' ],
+   [ 'code' => ':', 'message' => 'wikihiero-superposition', 
'example' => 'p:t' ],
+   [ 'code' => '*', 'message' => 'wikihiero-juxtaposition', 
'example' => 'p*t' ],
+   [ 'code' => '!', 'message' => 'wikihiero-eol', 'example' => 
'A1-B1 ! C1-D1' ],
+   [ 'code' => '\\', 'message' => 'wikihiero-mirror', 'example' => 
'A1\-A1' ],
+   [ 'code' => '..', 'message' => 'wikihiero-void', 'example' => 
'A1 .. B1' ],
+   [ 'code' => '.', 'message' => 'wikihiero-half-void', 'example' 
=> 'A1 . B1' ],
+   [ 'code' => '', 'message' => 'wikihiero-comment', 
'example' => 'A1' ],
+   ];
+   private $helpColumns = [
'code',
'meaning',
'example',
'result',
-   );
+   ];
 
public function __construct() {
parent::__construct( 'Hieroglyphs' );
@@ -70,18 +70,18 @@
 
$out->addHTML(
Html::openElement( 'form',
-   array(
+   [
'method' => 'get',
'action' => 
$this->getPageTitle()->getLinkUrl(),
-   )
+   ]
)
-   . Html::element( 'textarea', array( 'id' => 
'hiero-text', 'name' => 'text' ), $text )
-   . Html::element( 'input', array(
+   . Html::element( 'textarea', [ 'id' => 'hiero-text', 
'name' => 'text' ], $text )
+   . Html::element( 'input', [
'type' => 'submit',
'id' => 'hiero-submit',
'name' => 'submit',
'value' => $this->msg( 'wikihiero-submit' 
)->text(),
-   ) )
+   ] )
. Html::closeElement( 'form' )
);
 
@@ -168,7 +168,7 @@
$syntax = wfMessage( 'wikihiero-syntax' )->text();
$html .= ''
. Html::element( 'a',
-   array( 'href' => "#syntax", 'title' => 
$syntax ),
+   [ 'href' => "#syntax", 'title' => 
$syntax ],
$syntax
)
. '';
@@ -181,7 +181,7 @@
}
$html .= ''
. Html::element( 'a',
-   array( 'href' => "#cat-$cat", 'title' 
=> wfMessage( "wikihiero-category-$cat" )->text() ),
+   [ 'href' => "#cat-$cat", 'title' => 
wfMessage( "wikihiero-category-$cat" )->text() ],
$cat
)
. '';
@@ -192,7 +192,7 @@
}
$html .= ''
. Html::element( 'a',
-   array( 'href' => "#cat-$end", 'title' 
=> wfMessage( 

[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Convert to new array syntax

2016-12-01 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/324816

Change subject: Convert to new array syntax
..

Convert to new array syntax

Change-Id: Ief04ee0d01ef4877def3daa5e62da21b494f44d3
---
M HieroTokenizer.php
M SpecialHieroglyphs.php
M data/tables.php
M generateTables.php
M wikihiero.body.php
5 files changed, 1,052 insertions(+), 1,052 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero 
refs/changes/16/324816/1

diff --git a/HieroTokenizer.php b/HieroTokenizer.php
index e1f5cc7..6e97510 100644
--- a/HieroTokenizer.php
+++ b/HieroTokenizer.php
@@ -46,9 +46,9 @@
return;
}
 
-   self::$delimiters = array_flip( array( ' ', '-', "\t", "\n", 
"\r" ) );
-   self::$tokenDelimiters = array_flip( array( '*', ':', '(', ')' 
) );
-   self::$singleChars = array_flip( array( '!' ) );
+   self::$delimiters = array_flip( [ ' ', '-', "\t", "\n", "\r" ] 
);
+   self::$tokenDelimiters = array_flip( [ '*', ':', '(', ')' ] );
+   self::$singleChars = array_flip( [ '!' ] );
}
 
/**
@@ -61,8 +61,8 @@
return $this->blocks;
}
 
-   $this->blocks = array();
-   $this->currentBlock = array();
+   $this->blocks = [];
+   $this->currentBlock = [];
$this->token = '';
 
$text = preg_replace( '/\\', 'message' => 'wikihiero-comment', 
'example' => 'A1' ),
-   );
-   private $helpColumns = array(
+   private $syntaxHelp = [
+   [ 'code' => '-', 'message' => 'wikihiero-separator', 'example' 
=> 'A1 - B1' ],
+   [ 'code' => ':', 'message' => 'wikihiero-superposition', 
'example' => 'p:t' ],
+   [ 'code' => '*', 'message' => 'wikihiero-juxtaposition', 
'example' => 'p*t' ],
+   [ 'code' => '!', 'message' => 'wikihiero-eol', 'example' => 
'A1-B1 ! C1-D1' ],
+   [ 'code' => '\\', 'message' => 'wikihiero-mirror', 'example' => 
'A1\-A1' ],
+   [ 'code' => '..', 'message' => 'wikihiero-void', 'example' => 
'A1 .. B1' ],
+   [ 'code' => '.', 'message' => 'wikihiero-half-void', 'example' 
=> 'A1 . B1' ],
+   [ 'code' => '', 'message' => 'wikihiero-comment', 
'example' => 'A1' ],
+   ];
+   private $helpColumns = [
'code',
'meaning',
'example',
'result',
-   );
+   ];
 
public function __construct() {
parent::__construct( 'Hieroglyphs' );
@@ -70,18 +70,18 @@
 
$out->addHTML(
Html::openElement( 'form',
-   array(
+   [
'method' => 'get',
'action' => 
$this->getPageTitle()->getLinkUrl(),
-   )
+   ]
)
-   . Html::element( 'textarea', array( 'id' => 
'hiero-text', 'name' => 'text' ), $text )
-   . Html::element( 'input', array(
+   . Html::element( 'textarea', [ 'id' => 'hiero-text', 
'name' => 'text' ], $text )
+   . Html::element( 'input', [
'type' => 'submit',
'id' => 'hiero-submit',
'name' => 'submit',
'value' => $this->msg( 'wikihiero-submit' 
)->text(),
-   ) )
+   ] )
. Html::closeElement( 'form' )
);
 
@@ -168,7 +168,7 @@
$syntax = wfMessage( 'wikihiero-syntax' )->text();
$html .= ''
. Html::element( 'a',
-   array( 'href' => "#syntax", 'title' => 
$syntax ),
+   [ 'href' => "#syntax", 'title' => 
$syntax ],
$syntax
)
. '';
@@ -181,7 +181,7 @@
}
$html .= ''
. Html::element( 'a',
-   array( 'href' => "#cat-$cat", 'title' 
=> wfMessage( "wikihiero-category-$cat" )->text() ),
+   [ 'href' => "#cat-$cat", 'title' => 
wfMessage( "wikihiero-category-$cat" )->text() ],
$cat
)
. '';
@@ -192,7 +192,7 @@
}
$html .= ''
. Html::element( 'a',
-