lib/ControlSpaces.php
private function fixControlStructure(Tokens $tokens, $index)
    {
        // Ensure a single whitespace
        if (!$tokens[$index - 1]->isWhitespace() || $tokens[$index - 1]->isWhitespace($this->singleLineWhitespaceOptions)) {
            $tokens->ensureWhitespaceAtIndex($index - 1, 1, ' ');
        }

    }
private function fixControlStructure(Tokens $tokens, $index)
    {
        // Ensure a single whitespace
        if (!$tokens[$index - 1]->isWhitespace() || $tokens[$index - 1]->isWhitespace($this->singleLineWhitespaceOptions)) {
            $tokens->ensureWhitespaceAtIndex($index - 1, 1, ' ');
        }

    }
private function fixControlStructure ( Tokens $ tokens , $ index ) { // Ensure a single whitespace if ( ! $ tokens [ $ index - 1 ] -> isWhitespace ( ) || $ tokens [ $ index - 1 ] -> isWhitespace ( $ this -> singleLineWhitespaceOptions ) ) { $ tokens -> ensureWhitespaceAtIndex ( $ index - 1 , 1 , ' ' ) ; } }
Fixes whitespaces around braces of a control structure.

@param Tokens $tokens tokens to handle
@param int    $index  index of token
Fixes whitespaces around braces of a control structure .