Skip to content

Commit 2ecd3df

Browse files
committed
phpcs fixes
1 parent cf16071 commit 2ecd3df

16 files changed

+45
-45
lines changed

coder_sniffer/Drupal/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public function process(File $phpcsFile, $stackPtr)
9898
&& in_array($tokens[($i - 1)]['code'], [T_WHITESPACE, T_COMMA]) === false
9999
) {
100100
$error = 'Selectors must be on a single line';
101-
// cspell:ignore SeletorSingleLine
102-
$fix = $phpcsFile->addFixableError($error, $i, 'SeletorSingleLine');
101+
// Cspell:ignore SeletorSingleLine .
102+
$fix = $phpcsFile->addFixableError($error, $i, 'SeletorSingleLine');
103103
if ($fix === true) {
104104
$phpcsFile->fixer->replaceToken($i, str_replace($phpcsFile->eolChar, ' ', $tokens[$i]['content']));
105105
}

coder_sniffer/Drupal/Sniffs/CSS/ColourDefinitionSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function register()
5656
public function process(File $phpcsFile, $stackPtr)
5757
{
5858
$tokens = $phpcsFile->getTokens();
59-
$color = $tokens[$stackPtr]['content'];
59+
$color = $tokens[$stackPtr]['content'];
6060

6161
$expected = strtolower($color);
6262
if ($color !== $expected) {

coder_sniffer/Drupal/Sniffs/Commenting/ClassCommentSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* Checks that comment doc blocks exist on classes, interfaces and traits. Largely
1818
* copied from PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClassCommentSniff.
1919
*
20-
* @category PHP
21-
* @package PHP_CodeSniffer
22-
* @link http://pear.php.net/package/PHP_CodeSniffer
20+
* @category PHP
21+
* @package PHP_CodeSniffer
22+
* @link http://pear.php.net/package/PHP_CodeSniffer
2323
*/
2424
class ClassCommentSniff implements Sniff
2525
{

coder_sniffer/Drupal/Sniffs/Commenting/DeprecatedSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function process(File $phpcsFile, $stackPtr)
124124
// automatic fixes for Drupal core, and if the project is missing we are
125125
// assuming it is Drupal core. Deprecations for contrib projects are much
126126
// less frequent and faults can be corrected manually.
127-
// cspell:ignore xdev
127+
// Cspell:ignore xdev .
128128
preg_match('/^(.*)(as of|in) (drupal|)( |:|)+([\d\.\-xdev\?]+)(,| |. |)(.*)(removed|removal)([ |from|before|in|the]*) (drupal|)( |:|)([\d\-\.xdev]+)( |,|$)+(?:release|)(?:[\.,])*(.*)$/i', $text1, $matchesFix);
129129

130130
if (count($matchesFix) >= 12) {

coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ public function process(File $phpcsFile, $stackPtr)
382382
// Break out the tags into groups and check alignment within each.
383383
// A tag group is one where there are no blank lines between tags.
384384
// The param tag group is special as it requires all @param tags to be inside.
385-
$tagGroups = [];
386-
// cspell:ignore groupid
385+
$tagGroups = [];
386+
// Cspell:ignore groupid .
387387
$groupid = 0;
388388
$paramGroupid = null;
389389
$currentTag = null;

coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ public function process(File $phpcsFile, $stackPtr)
225225
&& $tokens[$next]['code'] === T_CLOSE_TAG
226226
) {
227227
$error = 'There must be no blank line after the file comment in a template';
228-
// cspell:ignore TeamplateSpacingAfterComment
229-
$fix = $phpcsFile->addFixableError($error, $commentEnd, 'TeamplateSpacingAfterComment');
228+
// Cspell:ignore TeamplateSpacingAfterComment .
229+
$fix = $phpcsFile->addFixableError($error, $commentEnd, 'TeamplateSpacingAfterComment');
230230
if ($fix === true) {
231231
$phpcsFile->fixer->beginChangeset();
232232
$uselessLine = ($commentEnd + 1);

coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FunctionCommentSniff implements Sniff
2727
/**
2828
* A map of invalid data types to valid ones for param and return documentation.
2929
*
30-
* cspell:ignore TRUEFALSE
30+
* Cspell:ignore TRUEFALSE
3131
*
3232
* @var array<string, string>
3333
*/
@@ -442,7 +442,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
442442
$comment .= ' '.$tokens[$i]['content'];
443443
if ($indent < 3) {
444444
$error = 'Throws comment indentation must be 3 spaces, found %s spaces';
445-
// cspell:ignore TrhowsCommentIndentation
445+
// Cspell:ignore TrhowsCommentIndentation .
446446
$phpcsFile->addError($error, $i, 'TrhowsCommentIndentation', [$indent]);
447447
}
448448
}

coder_sniffer/Drupal/Sniffs/Files/FileEncodingSniff.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/**
33
* \Drupal\Sniffs\Files\FileEncodingSniff.
44
*
5-
* @category PHP
6-
* @package PHP_CodeSniffer
7-
* @link http://pear.php.net/package/PHP_CodeSniffer
5+
* @category PHP
6+
* @package PHP_CodeSniffer
7+
* @link http://pear.php.net/package/PHP_CodeSniffer
88
*/
99

1010
namespace Drupal\Sniffs\Files;
@@ -17,9 +17,9 @@
1717
*
1818
* Validates the encoding of a file against a white list of allowed encodings.
1919
*
20-
* @category PHP
21-
* @package PHP_CodeSniffer
22-
* @link http://pear.php.net/package/PHP_CodeSniffer
20+
* @category PHP
21+
* @package PHP_CodeSniffer
22+
* @link http://pear.php.net/package/PHP_CodeSniffer
2323
*/
2424
class FileEncodingSniff implements Sniff
2525
{

coder_sniffer/Drupal/Sniffs/Formatting/MultiLineAssignmentSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
*
1818
* If an assignment goes over two lines, ensure the equal sign is indented.
1919
*
20-
* @category PHP
21-
* @package PHP_CodeSniffer
22-
* @link http://pear.php.net/package/PHP_CodeSniffer
20+
* @category PHP
21+
* @package PHP_CodeSniffer
22+
* @link http://pear.php.net/package/PHP_CodeSniffer
2323
*/
2424
class MultiLineAssignmentSniff implements Sniff
2525
{

coder_sniffer/Drupal/Sniffs/Functions/DiscouragedFunctionsSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DiscouragedFunctionsSniff extends ForbiddenFunctionsSniff
2727
* The value is NULL if no alternative exists, i.e., the function should
2828
* just not be used.
2929
*
30-
* cSpell:disable
30+
* cspell:disable
3131
*
3232
* @var array<string, null>
3333
*/
@@ -59,7 +59,7 @@ class DiscouragedFunctionsSniff extends ForbiddenFunctionsSniff
5959
'fnmatch' => null,
6060
// Functions which are a security risk.
6161
'eval' => null,
62-
// cSpell:enable
62+
// Cspell:enable .
6363
];
6464

6565
/**

0 commit comments

Comments
 (0)