nilportugues/php-sql-query-formatter

Formatter.php could be split

nilportugues opened this issue · 2 comments

New classes can be created for the following concepts:

  • Indent
  • Parentheses
  • NewLine

This will reduce complexity.

Can you explain this a little bit more?

Sure. I'm aiming for single responsability.

I believe formatter is doing 3 different actions that happen at various levels when parsing the SQL. Moving them to another class can help finding (possible) errors and work on optimizations.