Skip to content

Commit

Permalink
Minor other documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jun 19, 2018
1 parent 1660d30 commit eabd96f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions PHPCompatibility/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function stringToErrorCode($baseString)
/**
* Strip quotes surrounding an arbitrary string.
*
* Intended for use with the content of a T_CONSTANT_ENCAPSED_STRING / T_DOUBLE_QUOTED_STRING.
* Intended for use with the contents of a T_CONSTANT_ENCAPSED_STRING / T_DOUBLE_QUOTED_STRING.
*
* @param string $string The raw string.
*
Expand All @@ -271,7 +271,7 @@ public function stripQuotes($string)
/**
* Strip variables from an arbitrary double quoted string.
*
* Intended for use with the content of a T_DOUBLE_QUOTED_STRING.
* Intended for use with the contents of a T_DOUBLE_QUOTED_STRING.
*
* @param string $string The raw string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ForbiddenCallTimePassByReferenceSniff extends Sniff
* @var array
*/
private $assignOrCompare = array(
// Comparison tokens.
// Equality tokens.
'T_IS_EQUAL' => true,
'T_IS_NOT_EQUAL' => true,
'T_IS_IDENTICAL' => true,
Expand Down Expand Up @@ -226,7 +226,7 @@ protected function isCallTimePassByReferenceParam(\PHP_CodeSniffer_File $phpcsFi

} while ($nextVariable < $searchEndToken);

// This code should never be reached, but here in case of weird bugs ;-)
// This code should never be reached, but here in case of weird bugs.
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions PHPCompatibility/Sniffs/PHP/NewKeywordsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ protected function filterErrorData(array $data, array $itemInfo, array $errorInf
* A double quoted identifier will have the opening quote on position 3
* in the string: `<<<"ID"`.
*
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in
* the stack passed in $tokens.
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in
* the stack passed in $tokens.
*
* @return bool
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ protected function getErrorMsgTemplate()


/**
* Allow for concrete child classes to filter the error data before it's passed to PHPCS.
* Filter the error data before it's passed to PHPCS.
*
* @param array $data The error data array which was created.
* @param array $itemInfo Base information about the item this error message applies to.
Expand Down
2 changes: 1 addition & 1 deletion PHPCompatibility/Tests/BaseClass/IsNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IsNumberTest extends MethodTestFrame
* @covers \PHPCompatibility\Sniff::isPositiveNumber
* @covers \PHPCompatibility\Sniff::isNegativeNumber
*
* @param string $commentString The commentwhich prefaces the target snippet in the test file.
* @param string $commentString The comment which prefaces the target snippet in the test file.
* @param bool $allowFloats Testing the snippets for integers only or floats as well ?
* @param float|bool $isNumber The expected return value for isNumber().
* @param bool $isPositiveNumber The expected return value for isPositiveNumber().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public function process(\PHP_CodeSniffer_File $phpcsFile, $stackPtr)
* token will be examined as part of the snippet.
* @param bool $allowFloats Whether to only consider integers, or also floats.
*
* @return float|bool The number found if PHP would evaluate the snippet as a number.
* False if not or if it could not be reliably determined
* (variable or calculations and such).
* @return int|float|bool
*/
public function isNumber(\PHP_CodeSniffer_File $phpcsFile, $start, $end, $allowFloats = false)
{
Expand Down
2 changes: 1 addition & 1 deletion PHPCompatibility/Tests/BaseSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BaseSniffTest extends \PHPUnit_Framework_TestCase
*
* Used by PHPCS 1.x and 2.x.
*
* @var PHP_CodeSniffer
* @var \PHP_CodeSniffer
*/
protected static $phpcs = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NewFunctionParametersSniffTest extends BaseSniffTest
* @param string $functionName Function name.
* @param string $parameterName Parameter name.
* @param string $lastVersionBefore The PHP version just *before* the parameter was introduced.
* @param array $lines The line numbers in the test file which apply to this class.
* @param array $lines The line numbers in the test file which apply to this function parameter.
* @param string $okVersion A PHP version in which the parameter was ok to be used.
* @param string $testVersion Optional PHP version to use for testing the flagged case.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$a = '10 things' . ' or nothing';

/*
* Make sure that zeo numbers are correctly identified.
* Make sure that zero numbers are correctly identified.
*
* The below should be recognized as numbers (integers).
*/
Expand Down

0 comments on commit eabd96f

Please sign in to comment.