Skip to content

Commit

Permalink
Merge pull request #2430 from WordPress/feature/operatorspacing-sync-…
Browse files Browse the repository at this point in the history
…with-upstream-289

WhiteSpace/OperatorSpacing: add extra test
  • Loading branch information
dingo-d committed Mar 5, 2024
2 parents ae6d254 + 95904f3 commit 8b1a52e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ function fooBar( TypeA&namespace\TypeB $param ) : \TypeC&Partially\Qualified {}
class Foo {
public readonly int|string $prop;
}

// Safeguard that declare statements are ignored.
// Ref: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/289
declare(ticks=1);
4 changes: 4 additions & 0 deletions WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ function fooBar( TypeA&namespace\TypeB $param ) : \TypeC&Partially\Qualified {}
class Foo {
public readonly int|string $prop;
}

// Safeguard that declare statements are ignored.
// Ref: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/289
declare(ticks=1);

0 comments on commit 8b1a52e

Please sign in to comment.