Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #47 from radeksimko/master

Coding standards fix
  • Loading branch information...
commit 546e6a8be7b832f69551d7eb80d13f8cecb12689 2 parents b3be85a + 269386f
@gsherwood gsherwood authored
View
8 CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php
@@ -78,8 +78,12 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
* Processes this sniff, when one of its tokens is encountered.
*
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
- * @param int $stackPtr The position of the current token in
- * the token stack.
+ * @param int $start The first position
+ * in the token stack
+ * @param int $end The last position
+ * in the token stack
+ * @param array $tokens The stack of tokens that make up
+ * the file
*
* @return void
*/
View
2  CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php
@@ -152,7 +152,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
$nextCloser
);
- if ($nextCode !== FALSE) {
+ if ($nextCode !== false) {
$prevCode = $phpcsFile->findPrevious(T_WHITESPACE, ($nextCode - 1), $nextCase, true);
if ($tokens[$prevCode]['code'] !== T_COMMENT) {
$error = 'There must be a comment when fall-through is intentional in a non-empty case body';
View
12 CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php
@@ -208,12 +208,12 @@ public function processBracket(PHP_CodeSniffer_File $phpcsFile, $openBracket)
} else if ($gap !== 1) {
// Just make sure this is not actually an indent.
if ($tokens[$whitespace]['line'] === $tokens[($whitespace - 1)]['line']) {
- $error = 'Expected 1 space between comma and argument "%s"; %s found';
- $data = array(
- $arg,
- $gap,
- );
- $phpcsFile->addError($error, $nextToken, 'SpacingBeforeArg', $data);
+ $error = 'Expected 1 space between comma and argument "%s"; %s found';
+ $data = array(
+ $arg,
+ $gap,
+ );
+ $phpcsFile->addError($error, $nextToken, 'SpacingBeforeArg', $data);
}
}//end if
} else {
View
11 CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php
@@ -78,11 +78,12 @@ public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $st
/**
* Processes the contents of a single set of brackets.
*
- * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
- * @param int $stackPtr The position of the open bracket
- * in the stack passed in $tokens.
- * @param array $tokens The stack of tokens that make up
- * the file.
+ * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+ * @param int $openBracket The position of the open bracket
+ * in the stack passed in $tokens.
+ * @param array $tokens The stack of tokens that make up
+ * the file.
+ * @param string $type The type of the token
*
* @return void
*/
Please sign in to comment.
Something went wrong with that request. Please try again.