5

Is it a valid way(PSR-2) to write code with 2 blank lines in a row?

For example:

$a = 1;


$b = 2;

Or there always has to be only one blank line beetween $a and $b?

jftp
  • 185
  • 1
  • 8

1 Answers1

8

Yes, this is acceptable by the PSR-2 standard.

The standard indicates:

Blank lines MAY be added to improve readability and to indicate related blocks of code.

MrCode
  • 63,975
  • 10
  • 90
  • 112
  • I question how two line breaks makes something more readable than one line break. – Ian Sep 01 '17 at 12:41