crazyfactory/php-sniffs

Force blank line before return statement

Closed this issue · 1 comments

Like so:

function foo() {
    $a = 'x';

    return $a;
}

But don't need space when there is only one line in a function:

function foo()
{
    return 'x';
}

This should also be fine

function foo() {
   $a = 'x';

   // have some comment here
  return $a;
}