Skip to content

Commit 8b1a52e

Browse files
authored
Merge pull request #2430 from WordPress/feature/operatorspacing-sync-with-upstream-289
WhiteSpace/OperatorSpacing: add extra test
2 parents ae6d254 + 95904f3 commit 8b1a52e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.inc

+4
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ function fooBar( TypeA&namespace\TypeB $param ) : \TypeC&Partially\Qualified {}
7575
class Foo {
7676
public readonly int|string $prop;
7777
}
78+
79+
// Safeguard that declare statements are ignored.
80+
// Ref: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/289
81+
declare(ticks=1);

WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed

+4
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ function fooBar( TypeA&namespace\TypeB $param ) : \TypeC&Partially\Qualified {}
7575
class Foo {
7676
public readonly int|string $prop;
7777
}
78+
79+
// Safeguard that declare statements are ignored.
80+
// Ref: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/289
81+
declare(ticks=1);

0 commit comments

Comments
 (0)