diff --git a/SlevomatCodingStandard/Sniffs/Functions/NamedArgumentSpacingSniff.php b/SlevomatCodingStandard/Sniffs/Functions/NamedArgumentSpacingSniff.php index 5ad5c821c..b44272216 100644 --- a/SlevomatCodingStandard/Sniffs/Functions/NamedArgumentSpacingSniff.php +++ b/SlevomatCodingStandard/Sniffs/Functions/NamedArgumentSpacingSniff.php @@ -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'; /** @@ -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, ''); diff --git a/tests/Sniffs/Functions/NamedArgumentSpacingSniffTest.php b/tests/Sniffs/Functions/NamedArgumentSpacingSniffTest.php index 8b479437a..ff3de2055 100644 --- a/tests/Sniffs/Functions/NamedArgumentSpacingSniffTest.php +++ b/tests/Sniffs/Functions/NamedArgumentSpacingSniffTest.php @@ -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(