Here is the example code:
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
switch ( $_GET['action'] ?? 'login' ) {
}
Here is a sniff that I get:
phpcs: WPForms.Formatting.Switch.AddEmptyLineBefore: You should add an empty line before
Ideally, WPForms.Formatting.Switch.AddEmptyLineBefore should understand/respect the situations, when it requires a new line before the switch, but this new line is occupied by a PHP comment (maybe not any comment - but the phpcs-related comment).
Here is the example code:
Here is a sniff that I get:
Ideally,
WPForms.Formatting.Switch.AddEmptyLineBeforeshould understand/respect the situations, when it requires a new line before theswitch, but this new line is occupied by a PHP comment (maybe not any comment - but thephpcs-related comment).