Skip to content

Commit bc001b0

Browse files
authored
Merge pull request #82 from PHPCSStandards/feature/generic-openingfunctionbracekernighanritchie-fix-error-position
Generic/OpeningFunctionBraceKernighanRitchie: fix error position
2 parents b0cb9c5 + 26da214 commit bc001b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function process(File $phpcsFile, $stackPtr)
168168
if ($length !== 1) {
169169
$error = 'Expected 1 space before opening brace; found %s';
170170
$data = [$length];
171-
$fix = $phpcsFile->addFixableError($error, $closeBracket, 'SpaceBeforeBrace', $data);
171+
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'SpaceBeforeBrace', $data);
172172
if ($fix === true) {
173173
if ($length === 0 || $length === '\t') {
174174
$phpcsFile->fixer->addContentBefore($openingBrace, ' ');

0 commit comments

Comments
 (0)