mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 09:32:24 -04:00
Add Composer autoloading functions and PHPStan for testing
This commit is contained in:
parent
e198c4db65
commit
f5d7d4e02a
1518 changed files with 169063 additions and 30 deletions
81
vendor/nikic/php-parser/test/code/parser/stmt/switch.test
vendored
Normal file
81
vendor/nikic/php-parser/test/code/parser/stmt/switch.test
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
Switch
|
||||
-----
|
||||
<?php
|
||||
|
||||
switch ($a) {
|
||||
case 0:
|
||||
break;
|
||||
// Comment
|
||||
case 1;
|
||||
default:
|
||||
}
|
||||
|
||||
// alternative syntax
|
||||
switch ($a):
|
||||
endswitch;
|
||||
|
||||
// leading semicolon
|
||||
switch ($a) { ; }
|
||||
switch ($a): ; endswitch;
|
||||
-----
|
||||
array(
|
||||
0: Stmt_Switch(
|
||||
cond: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
cases: array(
|
||||
0: Stmt_Case(
|
||||
cond: Scalar_LNumber(
|
||||
value: 0
|
||||
)
|
||||
stmts: array(
|
||||
0: Stmt_Break(
|
||||
num: null
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Case(
|
||||
cond: Scalar_LNumber(
|
||||
value: 1
|
||||
)
|
||||
stmts: array(
|
||||
)
|
||||
comments: array(
|
||||
0: // Comment
|
||||
)
|
||||
)
|
||||
2: Stmt_Case(
|
||||
cond: null
|
||||
stmts: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Switch(
|
||||
cond: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
cases: array(
|
||||
)
|
||||
comments: array(
|
||||
0: // alternative syntax
|
||||
)
|
||||
)
|
||||
2: Stmt_Switch(
|
||||
cond: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
cases: array(
|
||||
)
|
||||
comments: array(
|
||||
0: // leading semicolon
|
||||
)
|
||||
)
|
||||
3: Stmt_Switch(
|
||||
cond: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
cases: array(
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue