Skip to content

Commit 695e4f0

Browse files
committed
Docs: various grammar/spelling/inline mark-up fixes
1 parent 4da4916 commit 695e4f0

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

PHPCSUtils/Tokens/Collections.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ class Collections
406406
* The method supports PHPCS 2.6.0 and up.
407407
*
408408
* Notable differences:
409-
* - The method will include the `T_ARRAY_HINT` and the `T_RETURN_TYPE tokens when used with PHPCS 2.x and 3.x.
409+
* - The method will include the `T_ARRAY_HINT` and the `T_RETURN_TYPE` tokens when used with PHPCS 2.x and 3.x.
410410
* These token constants will no longer exist in PHPCS 4.x.
411411
* - The method will include the `T_ARRAY` token which is needed for select arrow functions in PHPCS < 3.5.4.
412412
*
@@ -661,7 +661,7 @@ public static function propertyTypeTokensBC()
661661
* The method supports PHPCS 2.6.0 and up.
662662
*
663663
* Notable differences:
664-
* - The method will include the `T_ARRAY_HINT` and the `T_RETURN_TYPE tokens when used with PHPCS 2.x and 3.x.
664+
* - The method will include the `T_ARRAY_HINT` and the `T_RETURN_TYPE` tokens when used with PHPCS 2.x and 3.x.
665665
* These token constants will no longer exist in PHPCS 4.x.
666666
* - The method will include the `T_ARRAY` token which is needed for select arrow functions in PHPCS < 3.5.4.
667667
*

PHPCSUtils/Utils/ControlStructures.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public static function isElseIf(File $phpcsFile, $stackPtr)
200200
* Get the scope opener and closer for a `declare` statement.
201201
*
202202
* A `declare` statement can be:
203-
* - applied to the rest of the file, like `declare(ticks=1);`;
203+
* - applied to the rest of the file, like `declare(ticks=1);`
204204
* - applied to a limited scope using curly braces;
205205
* - applied to a limited scope using the alternative control structure syntax.
206206
*
@@ -358,7 +358,7 @@ public static function getDeclareScopeOpenClose(File $phpcsFile, $stackPtr)
358358
* @return array
359359
*
360360
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified $stackPtr is not of
361-
* type T_CATCH or doesn't exist or in case
361+
* type T_CATCH, doesn't exist or in case
362362
* of a parse error.
363363
*/
364364
public static function getCaughtExceptions(File $phpcsFile, $stackPtr)

PHPCSUtils/Utils/FunctionDeclarations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public static function getName(File $phpcsFile, $stackPtr)
201201
* @return array
202202
*
203203
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position is not a T_FUNCTION
204-
* or T_CLOSURE token nor an arrow function.
204+
* or T_CLOSURE token, nor an arrow function.
205205
*/
206206
public static function getProperties(File $phpcsFile, $stackPtr)
207207
{
@@ -604,7 +604,7 @@ public static function getParameters(File $phpcsFile, $stackPtr)
604604
* T_STRING token as those are the only two
605605
* tokens which can be the arrow function keyword.
606606
*
607-
* @return bool TRUE is the token is the "fn" keyword for an arrow function. FALSE when not or
607+
* @return bool TRUE if the token is the "fn" keyword for an arrow function. FALSE when not or
608608
* in case of live coding/parse error.
609609
*/
610610
public static function isArrowFunction(File $phpcsFile, $stackPtr)

PHPCSUtils/Utils/Lists.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public static function getOpenClose(File $phpcsFile, $stackPtr, $isShortList = n
260260
* // second item in `list($a, , $b)`.
261261
* 'is_nested_list' => bool, // Whether this is a nested list.
262262
* 'variable' => string|false, // The base variable being assigned to or
263-
* // FALSE in case of a nested list or avariable variable.
263+
* // FALSE in case of a nested list or a variable variable.
264264
* // I.e. `$a` in `list($a['key'])`.
265265
* 'assignment_token' => int|false, // The start pointer for the assignment.
266266
* 'assignment_end_token' => int|false, // The end pointer for the assignment.

PHPCSUtils/Utils/Numbers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Numbers
9595
`ixD';
9696

9797
/**
98-
* Regex to determine is a T_STRING following a T_[DL]NUMBER is part of a numeric literal sequence.
98+
* Regex to determine if a T_STRING following a T_[DL]NUMBER is part of a numeric literal sequence.
9999
*
100100
* PHP cross-version compat for PHP 7.4 numeric literals with underscore separators.
101101
*
@@ -144,7 +144,7 @@ class Numbers
144144
* Helper function to deal with numeric literals, potentially with underscore separators.
145145
*
146146
* PHP < 7.4 does not tokenize numeric literals containing underscores correctly.
147-
* As of PHPCS 3.5.3, PHPCS contains a back-fill, but this backfill was buggy in the initial
147+
* As of PHPCS 3.5.3, PHPCS contains a backfill, but this backfill was buggy in the initial
148148
* implementation. A fix for this broken backfill is included in PHPCS 3.5.4.
149149
*
150150
* Either way, this function provides a backfill for all PHPCS/PHP combinations where

PHPCSUtils/Utils/ObjectDeclarations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public static function getClassProperties(File $phpcsFile, $stackPtr)
219219
* Works for classes, anonymous classes and interfaces, though it is strongly recommended
220220
* to use the {@see \PHPCSUtils\Utils\ObjectDeclarations::findExtendedInterfaceNames()}
221221
* method to examine interfaces instead. Interfaces can extend multiple parent interfaces,
222-
* and that use case is not handled by this method.
222+
* and that use-case is not handled by this method.
223223
*
224224
* Main differences with the PHPCS version:
225225
* - Bugs fixed:

phpcsutils-autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class_alias('\PHP_CodeSniffer_Exception', '\PHP_CodeSniffer\Exceptions\Tokenizer
102102
/*
103103
* Alias the PHPUnit 4/5 TestCase class to its PHPUnit 6+ name.
104104
*
105-
* This allows the both the PHPCSUtils native unit tests as well as the
105+
* This allows both the PHPCSUtils native unit tests as well as the
106106
* `UtilityMethodTestCase` class to work cross-version with PHPUnit
107107
* below 6.x and above.
108108
*

0 commit comments

Comments
 (0)