Skip to content

Commit

Permalink
Merge pull request #248 from PHPCSStandards/universal/use-keywordspac…
Browse files Browse the repository at this point in the history
…ing-test-tweaks

Universal/KeywordSpacing: add some tests for unfixable errors
  • Loading branch information
jrfnl authored Jun 19, 2023
2 parents adf5c0f + 647eb22 commit 187da1c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions Universal/Tests/UseStatements/KeywordSpacingUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use

otherFunction;
use FuncTion\Util\functionB;
use CONST Vendor\Package\CONSTANT_NAME as OTHER_CONSTANT;
use CONST Vendor\Package\CONSTANT_NAME as /*comment*/ OTHER_CONSTANT;
use Const\Util\MyClass\CONSTANT_Y;

use Vendor\Package\MultiStatement as Multi,
Expand All @@ -67,8 +67,9 @@ Use function Vendor\Package\MultiFunction as MFunction,

use Some\NS\{
ClassName
// phpcs:ignore Stnd.Cat.Sniff --for reasons.
as OtherClassName,
function SubLevel\functionName
function/*comment*/ SubLevel\functionName
as OtherFunctionName,
const Constants\MYCONSTANT
as OTHERCONSTANT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use Vendor\Const\Name as CONSTANT_HANDLER;
use Vendor\Package\Name as OtherName;
use Function Vendor\Package\functionName as otherFunction;
use FuncTion \Util\functionB;
use CONST Vendor\Package\CONSTANT_NAME as OTHER_CONSTANT;
use CONST Vendor\Package\CONSTANT_NAME as /*comment*/ OTHER_CONSTANT;
use Const \Util\MyClass\CONSTANT_Y;

use Vendor\Package\MultiStatement as Multi,
Expand All @@ -58,8 +58,10 @@ Use function Vendor\Package\MultiFunction as MFunction,
strpos as pos;

use Some\NS\{
ClassName as OtherClassName,
function SubLevel\functionName as OtherFunctionName,
ClassName
// phpcs:ignore Stnd.Cat.Sniff --for reasons.
as OtherClassName,
function/*comment*/ SubLevel\functionName as OtherFunctionName,
const Constants\MYCONSTANT as OTHERCONSTANT,
};

Expand Down
12 changes: 6 additions & 6 deletions Universal/Tests/UseStatements/KeywordSpacingUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public function getErrorList($testFile = '')
65 => 4,
66 => 2,
68 => 1,
70 => 2,
71 => 1,
72 => 2,
73 => 1,
74 => 2,
78 => 1,
71 => 2,
72 => 1,
73 => 2,
74 => 1,
75 => 2,
79 => 1,
];

case 'KeywordSpacingUnitTest.2.inc':
Expand Down

0 comments on commit 187da1c

Please sign in to comment.