Skip to content

Refactoring formatter#646

Open
kamil-tekiela wants to merge 3 commits intophpmyadmin:masterfrom
kamil-tekiela:Refactoring-Formatter
Open

Refactoring formatter#646
kamil-tekiela wants to merge 3 commits intophpmyadmin:masterfrom
kamil-tekiela:Refactoring-Formatter

Conversation

@kamil-tekiela
Copy link
Contributor

These PR adds DTO for formatting options. In this repo, it seems that only type is ever provided. In the main repo only

$this->response->addJSON(['sql' => Formatter::format($query, ['line_ending' => ' ', 'indentation' => ''])]);

This PR removes the ability to provide custom formats. I don't know if any other project relies on it and I can add it back, but I removed it to make the code simpler. I think it would be better to keep that option even if it's not used in PMA, but please let me know which is better.

The options parts_newline and indent_parts were removed as I could not see them being used anywhere.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant