Skip to content

Commit 56f46af

Browse files
committed
CS: enforce consistent file header spacing
1 parent 310f292 commit 56f46af

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

phpcs.xml.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,13 @@
178178

179179
<!-- Handle consistent formatting of return types. -->
180180
<rule ref="PSR12.Functions.ReturnTypeDeclaration"/>
181+
182+
<!-- Separate header blocks with a single blank line. -->
183+
<rule ref="PSR12.Files.FileHeader">
184+
<exclude name="PSR12.Files.FileHeader.SpacingAfterTagBlock"/>
185+
</rule>
186+
<rule ref="PSR12.Files.FileHeader.SpacingAfterNamespaceBlock">
187+
<!-- Prevent conflict with function spacing sniff. -->
188+
<exclude-pattern>/requirements\.php</exclude-pattern>
189+
</rule>
181190
</ruleset>

src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600)
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
9+
910
namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP;
1011

1112
use PHP_CodeSniffer\Tests\Standards\AbstractSniffTestCase;

0 commit comments

Comments
 (0)