You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in cases where you have code like this:
if($thing and $thong and $foo)
{
}
sometimes what happens is people comment out part of the conditional, like:
if($thing and $thong) // and $foo)
{
}
then when formatting is applied, and braces are brought up beside the conditional, your code becomes broken, because the opening brace is now commented out:
if($thing and $thong) // and $foo){
}
The text was updated successfully, but these errors were encountered:
When I test this code with all the included standards, I get the following diff:
-if($thing and $thong) // and $foo)
-{
+if ($thing and $thong) {
}
PHPCS actually removes the commented out code and placed the brace in the correct location. Ideally, it shouldn't remove the comment because it could leave it in place, but I can't find a sniff that will add the brace to the end of the comment.
Can you let me know what standard you are using please.
in cases where you have code like this:
if($thing and $thong and $foo)
{
}
sometimes what happens is people comment out part of the conditional, like:
if($thing and $thong) // and $foo)
{
}
then when formatting is applied, and braces are brought up beside the conditional, your code becomes broken, because the opening brace is now commented out:
if($thing and $thong) // and $foo){
}
The text was updated successfully, but these errors were encountered: