PSR has a fairly clear stance regarding new lines after namespace declaration:
When present, there MUST be one blank line after the namespace declaration.
But what about blank lines before namespaces? Are there any rules or limitations about it? I believe I've seen something somewhere, but cannot find now.
The section 3. Declare Statements, Namespace, and Import Statements in PSR-12 talks about the various parts of the start of the script and states
(emphasis mine).
Also following is the example
which shows the spacing.
The main thing I read from this is not about defining the number of blank lines before but more defining that any of the components must have a single blank line between them.
Just a comment about PSR-2, is does state