Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Oct 8, 2023
1 parent 5cb40fa commit 89cd8e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class NamedArgumentSpacingSniff implements Sniff
{

public const CODE_WHITESPACE_BEFORE_COLOR = 'WhitespaceBeforeColon';
public const CODE_WHITESPACE_BEFORE_COLON = 'WhitespaceBeforeColon';
public const CODE_NO_WHITESPACE_AFTER_COLON = 'NoWhitespaceAfterColon';

/**
Expand Down Expand Up @@ -43,7 +43,7 @@ public function process(File $phpcsFile, $pointer): void
$fix = $phpcsFile->addFixableError(
sprintf('There must be no whitespace between named argument "%s" and colon.', $parameterName),
$colonPointer,
self::CODE_WHITESPACE_BEFORE_COLOR
self::CODE_WHITESPACE_BEFORE_COLON
);
if ($fix) {
$phpcsFile->fixer->replaceToken($colonPointer - 1, '');
Expand Down
2 changes: 1 addition & 1 deletion tests/Sniffs/Functions/NamedArgumentSpacingSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function testErrors(): void
self::assertSniffError(
$report,
3,
NamedArgumentSpacingSniff::CODE_WHITESPACE_BEFORE_COLOR,
NamedArgumentSpacingSniff::CODE_WHITESPACE_BEFORE_COLON,
'There must be no whitespace between named argument "search" and colon.'
);
self::assertSniffError(
Expand Down

0 comments on commit 89cd8e7

Please sign in to comment.