You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PSR12/FileHeader: make "SpacingAfter" and "SpacingInside" errorcodes modular
This changes the error codes for the `SpacingAfterBlock` and `SpacingInsideBlock` errors to modular error codes which include a reference to the type of header block, i.e. `SpacingAfterUseBlock`, `SpacingInsideUseFunctionBlock` etc.
This allows for more selective application of the rules.
Take for instance the quite common case of the header blocks all being separated by blank lines, except for the open tag and file docblock.
```php
<?php
/**
* File docblock.
*/
namespace A\B\C;
use B\C;
```
The modular errorcodes I'm proposing in this PR will allow for the sniff to be used to safeguard the blank lines between each section without enforcing a blank line between the PHP open tag and the file docblock.
0 commit comments