File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2323 "source" : " https://github.com/cakephp/debug_kit"
2424 },
2525 "require" : {
26- "cakephp/cakephp" : " 3.0.*"
26+ "cakephp/cakephp" : " 3.0.*" ,
27+ "jdorn/sql-formatter" : " ~1.2"
2728 },
2829 "require-dev" : {
2930 "cakephp/cakephp-codesniffer" : " dev-master" ,
Original file line number Diff line number Diff line change 1616 * @license http://www.opensource.org/licenses/mit-license.php MIT License
1717 */
1818$ noOutput = true ;
19+
20+ // Configure sqlformatter colours.
21+ SqlFormatter::$ quote_attributes = 'style="color: #004d40;" ' ;
22+ SqlFormatter::$ backtick_quote_attributes = 'style="color: #26a69a;" ' ;
23+ SqlFormatter::$ number_attributes = 'style="color: #ec407a;" ' ;
24+ SqlFormatter::$ word_attributes = 'style="color: #9c27b0;" ' ;
25+ SqlFormatter::$ pre_attributes = 'style="color: #222; background-color: transparent;" ' ;
1926?>
2027
2128<?php if (!empty ($ tables )): ?>
@@ -63,7 +70,7 @@ $noOutput = true;
6370 <tbody>
6471 <?php foreach ($ queries as $ query ): ?>
6572 <tr>
66- <td><?= h ($ query ['query ' ]) ?> </td>
73+ <td><?= SqlFormatter:: format ($ query ['query ' ]) ?> </td>
6774 <td><?= h ($ query ['rows ' ]) ?> </td>
6875 <td><?= h ($ query ['took ' ]) ?> </td>
6976 </tr>
You can’t perform that action at this time.
0 commit comments