As per the PSR-2 coding standard, case statements should not be wrapped in curly braces.
There is no need for braces, since each case is terminated by the next break.
There is also the option to use a semicolon instead of a colon, this is discouraged because
many programmers do not even know it works and the colon is universal between programming
languages.
As per the PSR-2 coding standard, case statements should not be wrapped in curly braces.
There is no need for braces, since each case is terminated by the next break.
There is also the option to use a semicolon instead of a colon, this is discouraged because
many programmers do not even know it works and the colon is universal between programming
languages.
As per the PSR-2 coding standard, case statements should not be wrapped in curly braces. There is no need for braces, since each case is terminated by the next
break
.There is also the option to use a semicolon instead of a colon, this is discouraged because many programmers do not even know it works and the colon is universal between programming languages.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.