coding-standards
coding-standards copied to clipboard
Comments in Control structures
Sometimes putting a comment right inside the control structure is (IMHO) the best place:
// Perform tests
if ($foo
// Testing phase 1
&& $foo->test1()
// Testing phase 2
&& $foo->test2())
{
echo 'True'
}
But code sniffer complains :unamused:
35 | ERROR | Each line in a multi-line IF statement must begin with a boolean operator
What do you think about adjust the rule?