joomla/coding-standards

Bug with Joomla.WhiteSpace.ControlStructureSpacing sniff

mbabker opened this issue · 2 comments

The below code block causes errors with the code sniff rules due to the comment between preceding the else keyword.

// If the data is a scalar value simply add it to the stream context options.
if (is_scalar($data))
{
    $options['content'] = $data;
}
// Otherwise we need to encode the value first.
else
{
    $options['content'] = http_build_query($data);
}

I've seen that a couple times in my code. Kind of annoying.

Fixed by #26