File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
+ use Doctrine \SqlFormatter \SqlFormatter ;
6
+ use Doctrine \SqlFormatter \Tokenizer ;
7
+
8
+ require_once __DIR__ . '/../vendor/autoload.php ' ;
9
+
5
10
if (PHP_SAPI !== 'cli ' ) :?>
6
11
<p>
7
12
Run this php script from the command line to see CLI syntax highlighting and
23
28
$ sql = stream_get_contents ($ fp );
24
29
}
25
30
26
- require_once __DIR__ . '/../vendor/autoload.php ' ;
27
-
28
- use Doctrine \SqlFormatter \SqlFormatter ;
29
- use Doctrine \SqlFormatter \Tokenizer ;
30
-
31
31
assert ($ sql !== false );
32
32
33
33
echo (new SqlFormatter ())->format ($ sql );
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- require_once __DIR__ . '/../vendor/autoload.php ' ;
6
-
7
5
use Doctrine \SqlFormatter \NullHighlighter ;
8
6
use Doctrine \SqlFormatter \SqlFormatter ;
9
7
use Doctrine \SqlFormatter \Tokenizer ;
10
8
9
+ require_once __DIR__ . '/../vendor/autoload.php ' ;
10
+
11
11
$ formatter = new SqlFormatter ();
12
12
13
13
// Example statements for formatting and highlighting
You can’t perform that action at this time.
0 commit comments