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?
Yes, this is acceptable by the PSR-2 standard.
Blank lines MAY be added to improve readability and to indicate related blocks of code.