From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/doctrine/orm/src/Query/Expr/Base.php | 96 ----------------------------- 1 file changed, 96 deletions(-) delete mode 100644 vendor/doctrine/orm/src/Query/Expr/Base.php (limited to 'vendor/doctrine/orm/src/Query/Expr/Base.php') diff --git a/vendor/doctrine/orm/src/Query/Expr/Base.php b/vendor/doctrine/orm/src/Query/Expr/Base.php deleted file mode 100644 index e0f2572..0000000 --- a/vendor/doctrine/orm/src/Query/Expr/Base.php +++ /dev/null @@ -1,96 +0,0 @@ - */ - protected array $allowedClasses = []; - - /** @var list */ - protected array $parts = []; - - public function __construct(mixed $args = []) - { - if (is_array($args) && array_key_exists(0, $args) && is_array($args[0])) { - $args = $args[0]; - } - - $this->addMultiple($args); - } - - /** - * @param string[]|object[]|string|object $args - * @psalm-param list|string|object $args - * - * @return $this - */ - public function addMultiple(array|string|object $args = []): static - { - foreach ((array) $args as $arg) { - $this->add($arg); - } - - return $this; - } - - /** - * @return $this - * - * @throws InvalidArgumentException - */ - public function add(mixed $arg): static - { - if ($arg !== null && (! $arg instanceof self || $arg->count() > 0)) { - // If we decide to keep Expr\Base instances, we can use this check - if (! is_string($arg) && ! in_array($arg::class, $this->allowedClasses, true)) { - throw new InvalidArgumentException(sprintf( - "Expression of type '%s' not allowed in this context.", - get_debug_type($arg), - )); - } - - $this->parts[] = $arg; - } - - return $this; - } - - /** @psalm-return 0|positive-int */ - public function count(): int - { - return count($this->parts); - } - - public function __toString(): string - { - if ($this->count() === 1) { - return (string) $this->parts[0]; - } - - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; - } -} -- cgit v1.2.3