File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed
Standards/Generic/Tests/ControlStructures Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,13 @@ if ($a)
77
77
<div style="text-align: right;">
78
78
<?php if ($ model ->scenario == 'simple ' ) $ widget ->renderPager () ?>
79
79
</div>
80
+
81
+ <?php
82
+ switch ($ this ->error ):
83
+ case Shop_Customer :: ERROR_INVALID_GENDER : ?>
84
+ Ungültiges Geschlecht!
85
+ <?php break ;
86
+ case Shop_Customer :: ERROR_EMAIL_IN_USE : ?>
87
+ Die eingetragene E-Mail-Adresse ist bereits registriert.
88
+ <?php break ;
89
+ endswitch ;
Original file line number Diff line number Diff line change @@ -78,3 +78,13 @@ if ($a) {
78
78
<div style="text-align: right;">
79
79
<?php if ($model->scenario == 'simple') { $widget->renderPager(); } ?>
80
80
</div>
81
+
82
+ <?php
83
+ switch ($this->error):
84
+ case Shop_Customer :: ERROR_INVALID_GENDER: ?>
85
+ Ungültiges Geschlecht!
86
+ <?php break;
87
+ case Shop_Customer :: ERROR_EMAIL_IN_USE: ?>
88
+ Die eingetragene E-Mail-Adresse ist bereits registriert.
89
+ <?php break;
90
+ endswitch;
Original file line number Diff line number Diff line change @@ -199,8 +199,14 @@ class PHP_CodeSniffer_Tokenizers_PHP
199
199
'with ' => array (),
200
200
),
201
201
T_SWITCH => array (
202
- 'start ' => array (T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET ),
203
- 'end ' => array (T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET ),
202
+ 'start ' => array (
203
+ T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET ,
204
+ T_COLON => T_COLON ,
205
+ ),
206
+ 'end ' => array (
207
+ T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET ,
208
+ T_ENDSWITCH => T_ENDSWITCH ,
209
+ ),
204
210
'strict ' => true ,
205
211
'shared ' => false ,
206
212
'with ' => array (),
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
59
59
- Fixed bug #493 : PSR1_Sniffs_Methods_CamelCapsMethodNameSniff false positives for some magic method detection
60
60
-- Thanks to Andreas Möller for the patch
61
61
- Fixed bug #496 : Closures in PSR2 are not checked for a space after the function keyword
62
+ - Fixed bug #497 : Generic InlineControlStructureSniff does not support alternative SWITCH syntax
62
63
</notes >
63
64
<contents >
64
65
<dir name =" /" >
You can’t perform that action at this time.
0 commit comments