function FixerHelper::removeWhitespaceBefore
2 calls to FixerHelper::removeWhitespaceBefore()
- RequireMultiLineCallSniff::process in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Functions/ RequireMultiLineCallSniff.php - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
- RequireMultiLineConditionSniff::process in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ ControlStructures/ RequireMultiLineConditionSniff.php - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Helpers/ FixerHelper.php, line 33
Class
- FixerHelper
- @internal
Namespace
SlevomatCodingStandard\HelpersCode
public static function removeWhitespaceBefore(File $phpcsFile, int $pointer) : void {
for ($i = $pointer - 1; $i > 0; $i--) {
if (preg_match('~^\\s+$~', $phpcsFile->fixer
->getTokenContent($i)) === 0) {
break;
}
$phpcsFile->fixer
->replaceToken($i, '');
}
}