diff --git a/lib/PHPParser/Node/Stmt/Case.php b/lib/PHPParser/Node/Stmt/Case.php index d957716..bf90c6e 100644 --- a/lib/PHPParser/Node/Stmt/Case.php +++ b/lib/PHPParser/Node/Stmt/Case.php @@ -16,8 +16,8 @@ class PHPParser_Node_Stmt_Case extends PHPParser_Node_Stmt public function __construct($cond, array $stmts = array(), array $attributes = array()) { parent::__construct( array( - 'stmts' => $stmts, 'cond' => $cond, + 'stmts' => $stmts, ), $attributes ); diff --git a/test/code/parser/expr/new.test b/test/code/parser/expr/new.test index d324338..daca29c 100644 --- a/test/code/parser/expr/new.test +++ b/test/code/parser/expr/new.test @@ -15,7 +15,7 @@ new $a->b->c(); new $a->b['c'](); new $a->b{'c'}(); -// test regression introduces by new dereferencing syntext +// test regression introduces by new dereferencing syntax (new A); ----- array( diff --git a/test/code/parser/stmt/switch.test b/test/code/parser/stmt/switch.test index db64846..8799a7a 100644 --- a/test/code/parser/stmt/switch.test +++ b/test/code/parser/stmt/switch.test @@ -23,23 +23,23 @@ array( ) cases: array( 0: Stmt_Case( - stmts: array( - ) cond: Scalar_LNumber( value: 0 ) - ) - 1: Stmt_Case( stmts: array( ) + ) + 1: Stmt_Case( cond: Scalar_LNumber( value: 1 ) - ) - 2: Stmt_Case( stmts: array( ) + ) + 2: Stmt_Case( cond: null + stmts: array( + ) ) ) )