Skip to content

Commit a9030fd

Browse files
committed
fix(cspell): Fix spelling in sniff error codes
1 parent 7118f7a commit a9030fd

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ public function process(File $phpcsFile, $stackPtr)
215215
&& $tokens[$next]['code'] === T_CLOSE_TAG
216216
) {
217217
$error = 'There must be no blank line after the file comment in a template';
218-
// cspell:ignore TeamplateSpacingAfterComment
219-
$fix = $phpcsFile->addFixableError($error, $commentEnd, 'TeamplateSpacingAfterComment');
218+
$fix = $phpcsFile->addFixableError($error, $commentEnd, 'TemplateSpacingAfterComment');
220219
if ($fix === true) {
221220
$phpcsFile->fixer->beginChangeset();
222221
$uselessLine = ($commentEnd + 1);

coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
471471
$comment .= ' '.$tokens[$i]['content'];
472472
if ($indent < 3) {
473473
$error = 'Throws comment indentation must be 3 spaces, found %s spaces';
474-
// cspell:ignore TrhowsCommentIndentation
475-
$phpcsFile->addError($error, $i, 'TrhowsCommentIndentation', [$indent]);
474+
$phpcsFile->addError($error, $i, 'ThrowsCommentIndentation', [$indent]);
476475
}
477476
}
478477
}

coder_sniffer/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public function process(File $phpcsFile, $stackPtr)
8080

8181
$ptr = self::getPtr('files[]', $file, $phpcsFile);
8282
$error = "It's only necessary to declare files[] if they declare a class or interface.";
83-
// cspell:ignore UnecessaryFileDeclaration
84-
$phpcsFile->addError($error, $ptr, 'UnecessaryFileDeclaration');
83+
$phpcsFile->addError($error, $ptr, 'UnnecessaryFileDeclaration');
8584
}//end foreach
8685
}//end if
8786

coder_sniffer/DrupalPractice/Sniffs/General/OptionsTSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ public function process(File $phpcsFile, $stackPtr)
127127
$afterValue = $phpcsFile->findNext(T_WHITESPACE, ($arrayValue + 1), $statementEnd, true);
128128
if ($tokens[$afterValue]['code'] === T_COMMA || $tokens[$afterValue]['code'] === T_CLOSE_PARENTHESIS) {
129129
$warning = '#options values usually have to run through t() for translation';
130-
// cspell:ignore TforValue
131-
$phpcsFile->addWarning($warning, $arrayValue, 'TforValue');
130+
$phpcsFile->addWarning($warning, $arrayValue, 'OptionsValue');
132131
}
133132
}
134133

0 commit comments

Comments
 (0)