Skip to content

Commit e9ebf52

Browse files
committed
Fixed spelling errors
1 parent 039b6d3 commit e9ebf52

28 files changed

+52
-53
lines changed

src/Files/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ public function getDeclarationName($stackPtr)
12961296
* )
12971297
* </code>
12981298
*
1299-
* Parameters with default values have an additional array indexs of:
1299+
* Parameters with default values have an additional array indexes of:
13001300
* 'default' => string, // The full content of the default value.
13011301
* 'default_token' => integer, // The stack pointer to the start of the default value.
13021302
* 'default_equal_token' => integer, // The stack pointer to the equals sign.

src/Fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function fixFile()
220220
* @param string $filePath Optional file path to diff the file against.
221221
* If not specified, the original version of the
222222
* file will be used.
223-
* @param boolean $colors Print colored output or not.
223+
* @param boolean $colors Print coloured output or not.
224224
*
225225
* @return string
226226
*/

src/Reports/Info.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public function generate(
114114
$valueWidth = max($valueWidth, strlen($value));
115115
}
116116

117-
$countWidth = strlen($totalCount);
118-
$nrOfThousandSeps = floor($countWidth / 3);
119-
$countWidth += $nrOfThousandSeps;
117+
// Length of the total string, plus however many
118+
// thousands separators there are.
119+
$countWidth = (strlen($totalCount) + floor($countWidth / 3));
120120

121121
// Account for 'total' line.
122122
$valueWidth = max(5, $valueWidth);

src/Ruleset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ public function registerSniffs($files, $restrictions, $exclusions)
11911191

11921192

11931193
/**
1194-
* Populates the array of PHP_CodeSniffer_Sniff's for this file.
1194+
* Populates the array of PHP_CodeSniffer_Sniff objects for this file.
11951195
*
11961196
* @return void
11971197
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If sniff registration fails.

src/Sniffs/AbstractScopeSniff.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ abstract class AbstractScopeSniff implements Sniff
6565
* the scope, by calling the
6666
* processTokenOutsideScope method.
6767
*
68-
* @see PHP_CodeSniffer.getValidScopeTokeners()
6968
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified tokens arrays are empty
7069
* or invalid.
7170
*/
@@ -133,20 +132,20 @@ final public function process(File $phpcsFile, $stackPtr)
133132
$tokens = $phpcsFile->getTokens();
134133

135134
$foundScope = false;
136-
$skipPtrs = [];
135+
$skipTokens = [];
137136
foreach ($tokens[$stackPtr]['conditions'] as $scope => $code) {
138137
if (isset($this->scopeTokens[$code]) === true) {
139-
$skipPtrs[] = $this->processTokenWithinScope($phpcsFile, $stackPtr, $scope);
140-
$foundScope = true;
138+
$skipTokens[] = $this->processTokenWithinScope($phpcsFile, $stackPtr, $scope);
139+
$foundScope = true;
141140
}
142141
}
143142

144143
if ($this->listenOutside === true && $foundScope === false) {
145-
$skipPtrs[] = $this->processTokenOutsideScope($phpcsFile, $stackPtr);
144+
$skipTokens[] = $this->processTokenOutsideScope($phpcsFile, $stackPtr);
146145
}
147146

148-
if (empty($skipPtrs) === false) {
149-
return min($skipPtrs);
147+
if (empty($skipTokens) === false) {
148+
return min($skipTokens);
150149
}
151150

152151
return;

src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<![CDATA[
1010
$shortVar <em>=</em> (1 + 2);
1111
$veryLongVarName <em>=</em> 'string';
12-
$var <em>=</em> foo($bar, $baz, $quux);
12+
$var <em>=</em> foo($bar, $baz);
1313
]]>
1414
</code>
1515
<code title="Not aligned; harder to read">
1616
<![CDATA[
1717
$shortVar <em>=</em> (1 + 2);
1818
$veryLongVarName <em>=</em> 'string';
19-
$var <em>=</em> foo($bar, $baz, $quux);
19+
$var <em>=</em> foo($bar, $baz);
2020
]]>
2121
</code>
2222
</code_comparison>

src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Detects for-loops that can be simplified to a while-loop.
44
*
5-
* This rule is based on the PMD rule catalog. Detects for-loops that can be
5+
* This rule is based on the PMD rule catalogue. Detects for-loops that can be
66
* simplified as a while-loop.
77
*
88
* <code>

src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Detects for-loops that use a function call in the test expression.
44
*
5-
* This rule is based on the PMD rule catalog. Detects for-loops that use a
5+
* This rule is based on the PMD rule catalogue. Detects for-loops that use a
66
* function call in the test expression.
77
*
88
* <code>

src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Detects incrementer jumbling in for loops.
44
*
5-
* This rule is based on the PMD rule catalog. The jumbling incrementer sniff
5+
* This rule is based on the PMD rule catalogue. The jumbling incrementer sniff
66
* detects the usage of one and the same incrementer into an outer and an inner
77
* loop. Even it is intended this is confusing code.
88
*

src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Detects unconditional if- and elseif-statements.
44
*
5-
* This rule is based on the PMD rule catalog. The Unconditional If Statement
5+
* This rule is based on the PMD rule catalogue. The Unconditional If Statement
66
* sniff detects statement conditions that are only set to one of the constant
77
* values <b>true</b> or <b>false</b>
88
*

0 commit comments

Comments
 (0)