Skip to content

Commit

Permalink
Adjusted addError call.
Browse files Browse the repository at this point in the history
See #1
  • Loading branch information
Rarst committed Dec 24, 2019
1 parent c736db0 commit dfbea87
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ public function process(File $phpcsFile, $stackPtr): void
return;
}

$method = $tokens[$stackPtr + 2]['content'];
$name = $tokens[$stackPtr + 2]['content'];

$phpcsFile->addError(
sprintf(
'Cognitive complexity for method "%s" is %d but has to be less than or equal to %d.',
$method,
'Cognitive complexity for "%s" is %d but has to be less than or equal to %d.',
$stackPtr,
'TooHigh',
[
$name,
$cognitiveComplexity,
$this->maxCognitiveComplexity
),
$stackPtr,
self::class
]
);
}
}

0 comments on commit dfbea87

Please sign in to comment.