Skip to content

Commit a6d0fc9

Browse files
committed
Unify use statements placement in examples
1 parent 15ab72a commit a6d0fc9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: examples/cli.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
declare(strict_types=1);
44

5+
use Doctrine\SqlFormatter\SqlFormatter;
6+
use Doctrine\SqlFormatter\Tokenizer;
7+
8+
require_once __DIR__ . '/../vendor/autoload.php';
9+
510
if (PHP_SAPI !== 'cli') :?>
611
<p>
712
Run this php script from the command line to see CLI syntax highlighting and
@@ -23,11 +28,6 @@
2328
$sql = stream_get_contents($fp);
2429
}
2530

26-
require_once __DIR__ . '/../vendor/autoload.php';
27-
28-
use Doctrine\SqlFormatter\SqlFormatter;
29-
use Doctrine\SqlFormatter\Tokenizer;
30-
3131
assert($sql !== false);
3232

3333
echo (new SqlFormatter())->format($sql);

Diff for: examples/examples.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
require_once __DIR__ . '/../vendor/autoload.php';
6-
75
use Doctrine\SqlFormatter\NullHighlighter;
86
use Doctrine\SqlFormatter\SqlFormatter;
97
use Doctrine\SqlFormatter\Tokenizer;
108

9+
require_once __DIR__ . '/../vendor/autoload.php';
10+
1111
$formatter = new SqlFormatter();
1212

1313
// Example statements for formatting and highlighting

0 commit comments

Comments
 (0)