private function fixLambdas(Tokens $tokens) { for ($index = $tokens->count() - 1; 0 <= $index; --$index) { $token = $tokens[$index]; if (!$token->isGivenKind(T_FUNCTION) || !$tokens->isLambda($index)) { continue; } $nextIndex = null; $tokens->getNextTokenOfKind($index, array('{'), $nextIndex); $tokens->ensureWhitespaceAtIndex($nextIndex - 1, 1, ' '); } }