Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FixerHelper.php

function FixerHelper::removeWhitespaceAfter

3 calls to FixerHelper::removeWhitespaceAfter()
AttributeAndTargetSpacingSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Attributes/AttributeAndTargetSpacingSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
RequireMultiLineConditionSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/RequireMultiLineConditionSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
RequireMultiLineMethodSignatureSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/RequireMultiLineMethodSignatureSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/FixerHelper.php, line 44

Class

FixerHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

public static function removeWhitespaceAfter(File $phpcsFile, int $pointer) : void {
    for ($i = $pointer + 1; $i < count($phpcsFile->getTokens()); $i++) {
        if (preg_match('~^\\s+$~', $phpcsFile->fixer
            ->getTokenContent($i)) === 0) {
            break;
        }
        $phpcsFile->fixer
            ->replaceToken($i, '');
    }
}
RSS feed
Powered by Drupal