1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-22 05:41:23 +01:00

Rename caseList to cases in Node_Stmt_Switch

This commit is contained in:
nikic 2011-10-15 19:30:48 +02:00
parent 2d57f52d24
commit df657b703e
2 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,8 @@
<?php
/**
* @property PHPParser_Node_Expr $cond Condition
* @property PHPParser_Node_Stmt_Case[] $caseList Case list
* @property PHPParser_Node_Expr $cond Condition
* @property PHPParser_Node_Stmt_Case[] $cases Case list
*/
class PHPParser_Node_Stmt_Switch extends PHPParser_Node_Stmt
{
@ -10,15 +10,15 @@ class PHPParser_Node_Stmt_Switch extends PHPParser_Node_Stmt
* Constructs a case node.
*
* @param PHPParser_Node_Expr $cond Condition
* @param PHPParser_Node_Stmt_Case[] $caseList Case list
* @param PHPParser_Node_Stmt_Case[] $cases Case list
* @param int $line Line
* @param null|string $docComment Nearest doc comment
*/
public function __construct(PHPParser_Node_Expr $cond, array $caseList, $line = -1, $docComment = null) {
public function __construct(PHPParser_Node_Expr $cond, array $cases, $line = -1, $docComment = null) {
parent::__construct(
array(
'cond' => $cond,
'caseList' => $caseList,
'cond' => $cond,
'cases' => $cases,
),
$line, $docComment
);

View File

@ -554,7 +554,7 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
public function pStmt_Switch(PHPParser_Node_Stmt_Switch $node) {
return 'switch (' . $this->p($node->cond) . ') {'
. "\n" . $this->pImplode($node->caseList) . '}';
. "\n" . $this->pImplode($node->cases) . '}';
}
public function pStmt_TryCatch(PHPParser_Node_Stmt_TryCatch $node) {