summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Query/Printer.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/orm/src/Query/Printer.php
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/orm/src/Query/Printer.php')
-rw-r--r--vendor/doctrine/orm/src/Query/Printer.php64
1 files changed, 0 insertions, 64 deletions
diff --git a/vendor/doctrine/orm/src/Query/Printer.php b/vendor/doctrine/orm/src/Query/Printer.php
deleted file mode 100644
index db1f159..0000000
--- a/vendor/doctrine/orm/src/Query/Printer.php
+++ /dev/null
@@ -1,64 +0,0 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Query;
6
7use function str_repeat;
8
9/**
10 * A parse tree printer for Doctrine Query Language parser.
11 *
12 * @link http://www.phpdoctrine.org
13 */
14class Printer
15{
16 /** Current indentation level */
17 protected int $indent = 0;
18
19 /**
20 * Constructs a new parse tree printer.
21 *
22 * @param bool $silent Parse tree will not be printed if true.
23 */
24 public function __construct(protected bool $silent = false)
25 {
26 }
27
28 /**
29 * Prints an opening parenthesis followed by production name and increases
30 * indentation level by one.
31 *
32 * This method is called before executing a production.
33 *
34 * @param string $name Production name.
35 */
36 public function startProduction(string $name): void
37 {
38 $this->println('(' . $name);
39 $this->indent++;
40 }
41
42 /**
43 * Decreases indentation level by one and prints a closing parenthesis.
44 *
45 * This method is called after executing a production.
46 */
47 public function endProduction(): void
48 {
49 $this->indent--;
50 $this->println(')');
51 }
52
53 /**
54 * Prints text indented with spaces depending on current indentation level.
55 *
56 * @param string $str The text.
57 */
58 public function println(string $str): void
59 {
60 if (! $this->silent) {
61 echo str_repeat(' ', $this->indent), $str, "\n";
62 }
63 }
64}