Skip to content

Commit 8c8c4ff

Browse files
committed
Minor documentation fixes
... picked up along the way.
1 parent fdcd295 commit 8c8c4ff

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

scripts/ValidatePEAR/FileList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __construct($directory, $rootPath='', $filter='')
7979

8080

8181
/**
82-
* Retrieve the filter file list as an array.
82+
* Retrieve the filtered file list as an array.
8383
*
8484
* @return array
8585
*/

src/Runner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public function runPHPCBF()
230230

231231

232232
/**
233-
* Exits if the minimum requirements of PHP_CodSniffer are not met.
233+
* Exits if the minimum requirements of PHP_CodeSniffer are not met.
234234
*
235235
* @return array
236236
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException

src/Sniffs/AbstractVariableSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct()
6464

6565

6666
/**
67-
* Processes the token in the specified PHP_CodeSniffer_File.
67+
* Processes the token in the specified PHP_CodeSniffer\Files\File.
6868
*
6969
* @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
7070
* token was found.
@@ -92,7 +92,7 @@ final protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $cu
9292
return;
9393
}
9494

95-
// If this token is inside nested inside a function at a deeper
95+
// If this token is nested inside a function at a deeper
9696
// level than the current OO scope that was found, it's a normal
9797
// variable and not a member var.
9898
$conditions = array_reverse($tokens[$stackPtr]['conditions'], true);
@@ -119,7 +119,7 @@ final protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $cu
119119
if ($inFunction === false && isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
120120
foreach ($tokens[$stackPtr]['nested_parenthesis'] as $opener => $closer) {
121121
if (isset($tokens[$opener]['parenthesis_owner']) === false) {
122-
// Check if this is a USE statement in a closure.
122+
// Check if this is a USE statement for a closure.
123123
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), null, true);
124124
if ($tokens[$prev]['code'] === T_USE) {
125125
$inFunction = true;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function process(File $phpcsFile, $stackPtr)
7272
}
7373

7474
// If the next non-whitespace token after the function or method call
75-
// is not an opening parenthesis then it cant really be a *call*.
75+
// is not an opening parenthesis then it can't really be a *call*.
7676
$openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($functionName + 1), null, true);
7777
if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
7878
return;

src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
548548
// Check number of spaces after the var name.
549549
$this->checkSpacingAfterParamName($phpcsFile, $param, $maxVar);
550550

551-
// Param comments must start with a capital letter and end with the full stop.
551+
// Param comments must start with a capital letter and end with a full stop.
552552
if (preg_match('/^(\p{Ll}|\P{L})/u', $param['comment']) === 1) {
553553
$error = 'Parameter comment must start with a capital letter';
554554
$phpcsFile->addError($error, $param['tag'], 'ParamCommentNotCapital');

src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ public function process(File $phpcsFile, $stackPtr)
133133
}
134134
}
135135

136-
// We don't want end of block comments. If the last comment is a closing
137-
// curly brace.
136+
// We don't want end of block comments. Check if the last token before the
137+
// comment is a closing curly brace.
138138
$previousContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
139139
if ($tokens[$previousContent]['line'] === $tokens[$stackPtr]['line']) {
140140
if ($tokens[$previousContent]['code'] === T_CLOSE_CURLY_BRACKET) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function process(File $phpcsFile, $stackPtr)
228228
&& $tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line']
229229
&& $tokens[($stackPtr - 2)]['line'] === $tokens[($stackPtr - 1)]['line']
230230
) {
231-
// Spacing around properties and functions in nested classes has their own rules.
231+
// Properties and functions in nested classes have their own rules for spacing.
232232
$conditions = $tokens[$stackPtr]['conditions'];
233233
$deepestScope = end($conditions);
234234
if ($deepestScope === T_ANON_CLASS) {

src/Util/Common.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ public static function isUnderscoreName($string)
384384

385385

386386
/**
387-
* Returns a valid variable type for param/var tag.
387+
* Returns a valid variable type for param/var tags.
388388
*
389-
* If type is not one of the standard type, it must be a custom type.
389+
* If type is not one of the standard types, it must be a custom type.
390390
* Returns the correct type name suggestion if type name is invalid.
391391
*
392392
* @param string $varType The variable type to process.

0 commit comments

Comments
 (0)