Skip to content

Commit 632c8f3

Browse files
committed
Fix typos in code comments and documentation
1 parent e64a980 commit 632c8f3

11 files changed

+20
-20
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The `MINOR` version is incremented when:
9999
- backwards-compatible changes are made to the API used by sniff developers, or
100100
- new sniffs are added to an included standard
101101

102-
> NOTE: Backwards-compatible changes to the API used by sniff develpers will allow an exsiting sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required.
102+
> NOTE: Backwards-compatible changes to the API used by sniff develpers will allow an existing sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required.
103103
104104
The `PATCH` version is incremented when:
105105
- backwards-compatible bug fixes are made

package.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
24522452
-- Also used by the autoloader to help other standards directly include sniffs for your standard
24532453
-- Set the value to the namespace prefix you are using for sniff files (everything up to \Sniffs\)
24542454
-- e.g., if your namespace format is MyProject\CS\Standard\Sniffs\Category set the namespace to MyProject\CS\Standard
2455-
-- If ommitted, the namespace is assumed to be the same as the directory name containing the ruleset.xml file
2455+
-- If omitted, the namespace is assumed to be the same as the directory name containing the ruleset.xml file
24562456
-- The namespace is set in the ruleset tag of the ruleset.xml file
24572457
-- e.g., ruleset name="My Coding Standard" namespace="MyProject\CS\Standard"
24582458
- Rulesets can now specify custom autoloaders using the new autoload tag
@@ -2501,7 +2501,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
25012501
-- e.g., StandardName\Sniffs\CategoryName\AbstractHelper or StandardName\Helpers\StringSniffHelper
25022502
- Fixed an error where STDIN was sometimes not checked when using the --parallel CLI option
25032503
- The is_closure index has been removed from the return value of File::getMethodProperties()
2504-
-- This value was always false becasue T_FUNCTION tokens are never closures
2504+
-- This value was always false because T_FUNCTION tokens are never closures
25052505
-- Closures have a token type of T_CLOSURE
25062506
- The File::isAnonymousFunction() method has been removed
25072507
-- This function always returned false because it only accepted T_FUNCTION tokens, which are never closures
@@ -2984,7 +2984,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
29842984
- Added Generic.PHP.DisallowAlternativePHPTags to ban the use of alternate PHP tags
29852985
-- Thanks to Juliette Reinders Folmer for the patch
29862986
- Squiz.WhiteSpace.LanguageConstructSpacing no longer checks for spaces if parenthesis are being used (request #1062)
2987-
-- Makes this sniff more compatibile with those that check parenthesis spacing of function calls
2987+
-- Makes this sniff more compatible with those that check parenthesis spacing of function calls
29882988
- Squiz.WhiteSpace.ObjectOperatorSpacing now has a setting to ignore newline characters around object operators
29892989
-- Default remains FALSE, so newlines are not allowed
29902990
-- Override the "ignoreNewlines" setting in a ruleset.xml file to change
@@ -4884,7 +4884,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
48844884
- Messages can now be changed from errors to warnings (and vice versa) inside ruleset.xml files
48854885
-- As you would with "message" and "severity", specify a "type" tag under a "rule" tag and set the value to "error" or "warning"
48864886
- PHP_CodeSniffer will now generate a warning on files that it detects have mixed line endings
4887-
-- This warning has the code Internal.LineEndings.Mixed and can be overriden in a ruleset.xml file
4887+
-- This warning has the code Internal.LineEndings.Mixed and can be overridden in a ruleset.xml file
48884888
-- Thanks to Vit Brunner for help with this
48894889
- Sniffs inside PHP 5.3 namespaces are now supported, along with the existing underscore-style emulated namespaces
48904890
-- For example: namespace MyStandard\Sniffs\Arrays; class ArrayDeclarationSniff implements \PHP_CodeSniffer_Sniff { ...
@@ -5016,7 +5016,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
50165016
- Squiz FunctionDeclarationArgumentSpacing now has a setting to specify how many spaces should surround equals signs
50175017
-- Default remains at 0
50185018
-- Override the equalsSpacing setting in a ruleset.xml file to change
5019-
- Squiz ClassDeclarationSniff now throws errors for > 1 space before extends/implements class name with ns seperator
5019+
- Squiz ClassDeclarationSniff now throws errors for > 1 space before extends/implements class name with ns separator
50205020
- Squiz standard now warns about deprecated functions using Generic DeprecatedFunctionsSniff
50215021
- PEAR FunctionDeclarationSniff now reports an error for multiple spaces after the FUNCTION keyword and around USE
50225022
- PEAR FunctionDeclarationSniff now supports closures
@@ -5111,7 +5111,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
51115111
<notes>
51125112
- Added new Generic FixmeSniff that shows error messages for all FIXME comments left in your code
51135113
-- Thanks to Sam Graham for the contribution
5114-
- The maxPercentage setting in the Squiz CommentedOutCodeSniff can now be overriden in a rulset.xml file
5114+
- The maxPercentage setting in the Squiz CommentedOutCodeSniff can now be overridden in a rulset.xml file
51155115
-- Thanks to Volker Dusch for the patch
51165116
- The Checkstyle and XML reports now use XMLWriter
51175117
-- Only change in output is that empty file tags are no longer produced for files with no violations
@@ -5875,7 +5875,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
58755875
- Fixed bug #13922 : crash in case of malformed (but tokenized) php file
58765876
-- PEAR and Squiz ClassDeclarationSniff now throw warnings for possible parse errors
58775877
-- Squiz ValidClassNameSniff now throws warning for possible parse errors
5878-
-- Squiz ClosingDeclarationCommentSniff now throws additonal warnings for parse errors
5878+
-- Squiz ClosingDeclarationCommentSniff now throws additional warnings for parse errors
58795879
</notes>
58805880
</release>
58815881
<release>
@@ -5969,7 +5969,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
59695969
- Squiz OutputBufferingIndentSniff now ignores the indentation of inline HTML
59705970
- MySource IncludeSystemSniff now ignores usage of ZipArchive
59715971
- Removed "function" from error messages for Generic function brace sniffs (feature request #13820)
5972-
- Generic UpperCaseConstantSniff no longer throws errors for delcare(ticks = ...)
5972+
- Generic UpperCaseConstantSniff no longer throws errors for declare(ticks = ...)
59735973
-- Thanks to Josh Snyder for the patch
59745974
- Squiz ClosingDeclarationCommentSniff and AbstractVariableSniff now throw warnings for possible parse errors
59755975
- Fixed bug #13827 : AbstractVariableSniff throws "undefined index"
@@ -6390,7 +6390,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
63906390
- Fixed missing error when multiple statements are not aligned correctly with object operators
63916391
- Fixed incorrect errors for some PHP special variables in Squiz ValidVariableNameSniff
63926392
- Fixed incorrect errors for arrays that only contain other arrays in Squiz ArrayDeclarationSniff
6393-
- Fixed bug #9844 : throw new Exception(\n accidently reported as error but it ain't
6393+
- Fixed bug #9844 : throw new Exception(\n accidentally reported as error but it ain't
63946394
</notes>
63956395
</release>
63966396
<release>

src/Files/File.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function process()
388388
|| substr($commentTextLower, 0, 10) === '@phpcs:set'
389389
) {
390390
// If the @phpcs: syntax is being used, strip the @ to make
391-
// comparisions easier.
391+
// comparisons easier.
392392
if ($commentText[0] === '@') {
393393
$commentText = substr($commentText, 1);
394394
}
@@ -1605,7 +1605,7 @@ public function getMethodProperties($stackPtr)
16051605
* <code>
16061606
* array(
16071607
* 'scope' => 'public', // public protected or protected.
1608-
* 'scope_specified' => false, // true if the scope was explicitely specified.
1608+
* 'scope_specified' => false, // true if the scope was explicitly specified.
16091609
* 'is_static' => false, // true if the static keyword was found.
16101610
* );
16111611
* </code>

src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function process(File $phpcsFile, $stackPtr)
115115
&& $tokens[($openingBrace - 1)]['line'] === $tokens[$openingBrace]['line']
116116
&& $tokens[($openingBrace - 2)]['line'] < $tokens[$openingBrace]['line']
117117
) {
118-
// Brace is preceeded by indent, so remove it to ensure we don't
118+
// Brace is preceded by indent, so remove it to ensure we don't
119119
// leave behind more indent than is required for the first line.
120120
$phpcsFile->fixer->replaceToken(($openingBrace - 1), '');
121121
}

src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function process(File $phpcsFile, $stackPtr)
122122
&& $tokens[$tokens[$lastBracket]['parenthesis_owner']]['code'] === T_CATCH
123123
) {
124124
// This is a pipe character inside a catch statement, so it is acting
125-
// as an exception type seperator and not an arithmetic operation.
125+
// as an exception type separator and not an arithmetic operation.
126126
return;
127127
}
128128
}

src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function process(File $phpcsFile, $stackPtr)
7878
return;
7979
}
8080

81-
// If the ruleset has only overriden the spacing property, use
81+
// If the ruleset has only overridden the spacing property, use
8282
// that value for all spacing rules.
8383
if ($this->rulesetProperties === null) {
8484
$this->rulesetProperties = [];

src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Checks for unneeded whitespace.
44
*
5-
* Checks that no whitespace preceeds the first content of the file, exists
5+
* Checks that no whitespace precedes the first content of the file, exists
66
* after the last content of the file, resides after content on any line, or
77
* are two empty lines in functions.
88
*

src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class MyClass
118118
{
119119

120120
/**
121-
* The tag that this element represents (omiting the @ symbol).
121+
* The tag that this element represents (omitting the @ symbol).
122122
*
123123
* @var string
124124
*/

src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.inc.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class MyClass
136136
{
137137

138138
/**
139-
* The tag that this element represents (omiting the @ symbol).
139+
* The tag that this element represents (omitting the @ symbol).
140140
*
141141
* @var string
142142
*/

src/Tokenizers/PHP.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ function return types. We want to keep the parenthesis map clean,
11191119

11201120
// Any T_ARRAY tokens we find between here and the next
11211121
// token that can't be part of the return type need to be
1122-
// coverted to T_STRING tokens.
1122+
// converted to T_STRING tokens.
11231123
for ($x; $x < $numTokens; $x++) {
11241124
if (is_array($tokens[$x]) === false || isset($allowed[$tokens[$x][0]]) === false) {
11251125
break;

src/Tokenizers/Tokenizer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private function createPositionMap()
285285
|| substr($commentTextLower, 0, 7) === '@phpcs:'
286286
) {
287287
// If the @phpcs: syntax is being used, strip the @ to make
288-
// comparisions easier.
288+
// comparisons easier.
289289
if ($commentText[0] === '@') {
290290
$commentText = substr($commentText, 1);
291291
$commentTextLower = strtolower($commentText);

0 commit comments

Comments
 (0)