main/migration/Twig/SqlFormatterExtension.php
public function formatSql($sql, $tabOffset = 3)
    {
        $tab = Formatter::$tab;
        $indent = '';

        for ($i = 0; $i < $tabOffset; ++$i) {
            $indent .= $tab;
        }

        $sql = explode("\n", Formatter::format($sql, false));
        $indentedLines = array();

        foreach ($sql as $line) {
            $indentedLines[] = $indent.str_replace('"', '\"', $line);
        }

        return implode("\n", $indentedLines);
    }
public function formatSql($sql, $tabOffset = 3)
    {
        $tab = Formatter::$tab;
        $indent = '';

        for ($i = 0; $i < $tabOffset; ++$i) {
            $indent .= $tab;
        }

        $sql = explode("\n", Formatter::format($sql, false));
        $indentedLines = array();

        foreach ($sql as $line) {
            $indentedLines[] = $indent.str_replace('"', '\"', $line);
        }

        return implode("\n", $indentedLines);
    }
public function formatSql ( $ sql , $ tabOffset = 3 ) { $ tab = Formatter :: $ tab ; $ indent = '' ; for ( $ i = 0 ; $ i < $ tabOffset ; ++ $ i ) { $ indent .= $ tab ; } $ sql = explode ( "\n" , Formatter :: format ( $ sql , false ) ) ; $ indentedLines = array ( ) ; foreach ( $ sql as $ line ) { $ indentedLines [ ] = $ indent . str_replace ( '"' , '\"' , $ line ) ; } return implode ( "\n" , $ indentedLines ) ; }
Formats an SQL query using the SqlFormatter library.

@param string $sql
@param int    $tabOffset

@return string
Formats an SQL query using the SqlFormatter library .