code: private function removeSpaceAroundToken(Tokens $tokens, $index)
      {
          $token = $tokens[$index];
  
          if ($token->isWhitespace() && false === strpos($token->getContent(), "\n")) {
              $tokens->clearAt($index);
          }
      }
docs: Remove spaces from token at a given index.
  
  @param Tokens $tokens
  @param int    $index