File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,22 @@ protected function getNonCatchablePatterns()
5656 */
5757 protected function getType (&$ value )
5858 {
59- switch ($ value ) {
60- case ') ' :
61- return self ::T_CLOSE_PARENTHESIS ;
62- case '{ ' :
63- return self ::T_OPEN_CURLY_BRACE ;
64- case '} ' :
65- return self ::T_CLOSE_CURLY_BRACE ;
66- case ': ' :
67- return self ::T_COLON ;
68- case ', ' :
69- return self ::T_COMMA ;
70- default :
71- $ type = self ::T_NONE ;
72- break ;
59+ $ type = self ::T_NONE ;
60+
61+ if (') ' === $ value ) {
62+ return self ::T_CLOSE_PARENTHESIS ;
63+ }
64+ if ('{ ' === $ value ) {
65+ return self ::T_OPEN_CURLY_BRACE ;
66+ }
67+ if ('} ' === $ value ) {
68+ return self ::T_CLOSE_CURLY_BRACE ;
69+ }
70+ if (': ' === $ value ) {
71+ return self ::T_COLON ;
72+ }
73+ if (', ' === $ value ) {
74+ return self ::T_COMMA ;
7375 }
7476
7577 if ($ this ->isTypePatternToken ($ value )) {
You can’t perform that action at this time.
0 commit comments