You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bin/sql-formatter
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
#!/usr/bin/env php
2
2
<?php
3
3
4
-
if("cli" !== php_sapi_name()) {
4
+
useDoctrine\SqlFormatter\SqlFormatter;
5
+
6
+
if('cli' !== php_sapi_name()) {
5
7
echo"<p>Run this PHP script from the command line to see CLI syntax highlighting and formatting. It supports Unix pipes or command line argument style.</p>";
6
8
echo"<pre><code>php bin/sql-formatter \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\"</code></pre>";
7
9
echo"<pre><code>echo \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\" | php bin/sql-formatter</code></pre>";
@@ -27,4 +29,4 @@ foreach ($autoloadFiles as $autoloadFile) {
0 commit comments