crazyfactory/php-sniffs

Force blank line before return statement

turbo8p opened 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;
}