/**
* @ingroup Parser
*/
-class ParserDiffTest
-{
+class ParserDiffTest {
public $parsers;
public $conf;
public $shortOutput = false;
foreach ( $this->conf['parsers'] as $i => $parserConf ) {
if ( !is_array( $parserConf ) ) {
$class = $parserConf;
- $parserConf = array( 'class' => $parserConf );
+ $parserConf = [ 'class' => $parserConf ];
} else {
$class = $parserConf['class'];
}
public function __call( $name, $args ) {
$this->init();
- $results = array();
+ $results = [];
$mismatch = false;
$lastResult = null;
$first = true;
foreach ( $this->parsers as $i => $parser ) {
- $currentResult = call_user_func_array( array( &$this->parsers[$i], $name ), $args );
+ $currentResult = call_user_func_array( [ &$this->parsers[$i], $name ], $args );
if ( $first ) {
$first = false;
} else {
}
if ( $mismatch ) {
if ( count( $results ) == 2 ) {
- $resultsList = array();
+ $resultsList = [];
foreach ( $this->parsers as $i => $parser ) {
$resultsList[] = var_export( $results[$i], true );
}