diff options
| author | polo <ordipolo@gmx.fr> | 2026-10-18 00:08:23 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-10-18 00:10:03 +0200 |
| commit | 05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch) | |
| tree | cf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/orm/src/Query/Expr/Composite.php | |
| parent | 32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff) | |
| download | AppliGestionPHP-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/Expr/Composite.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Query/Expr/Composite.php | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/doctrine/orm/src/Query/Expr/Composite.php b/vendor/doctrine/orm/src/Query/Expr/Composite.php deleted file mode 100644 index f3007a7..0000000 --- a/vendor/doctrine/orm/src/Query/Expr/Composite.php +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM\Query\Expr; | ||
| 6 | |||
| 7 | use Stringable; | ||
| 8 | |||
| 9 | use function implode; | ||
| 10 | use function is_object; | ||
| 11 | use function preg_match; | ||
| 12 | |||
| 13 | /** | ||
| 14 | * Expression class for building DQL and parts. | ||
| 15 | * | ||
| 16 | * @link www.doctrine-project.org | ||
| 17 | */ | ||
| 18 | class Composite extends Base | ||
| 19 | { | ||
| 20 | public function __toString(): string | ||
| 21 | { | ||
| 22 | if ($this->count() === 1) { | ||
| 23 | return (string) $this->parts[0]; | ||
| 24 | } | ||
| 25 | |||
| 26 | $components = []; | ||
| 27 | |||
| 28 | foreach ($this->parts as $part) { | ||
| 29 | $components[] = $this->processQueryPart($part); | ||
| 30 | } | ||
| 31 | |||
| 32 | return implode($this->separator, $components); | ||
| 33 | } | ||
| 34 | |||
| 35 | private function processQueryPart(string|Stringable $part): string | ||
| 36 | { | ||
| 37 | $queryPart = (string) $part; | ||
| 38 | |||
| 39 | if (is_object($part) && $part instanceof self && $part->count() > 1) { | ||
| 40 | return $this->preSeparator . $queryPart . $this->postSeparator; | ||
| 41 | } | ||
| 42 | |||
| 43 | // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND") | ||
| 44 | if (preg_match('/\s(OR|AND)\s/i', $queryPart)) { | ||
| 45 | return $this->preSeparator . $queryPart . $this->postSeparator; | ||
| 46 | } | ||
| 47 | |||
| 48 | return $queryPart; | ||
| 49 | } | ||
| 50 | } | ||
