summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Portability/OptimizeFlags.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/dbal/src/Portability/OptimizeFlags.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/dbal/src/Portability/OptimizeFlags.php')
-rw-r--r--vendor/doctrine/dbal/src/Portability/OptimizeFlags.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php b/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php
deleted file mode 100644
index c985d4b..0000000
--- a/vendor/doctrine/dbal/src/Portability/OptimizeFlags.php
+++ /dev/null
@@ -1,42 +0,0 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Portability;
6
7use Doctrine\DBAL\Platforms\AbstractPlatform;
8use Doctrine\DBAL\Platforms\DB2Platform;
9use Doctrine\DBAL\Platforms\OraclePlatform;
10use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
11use Doctrine\DBAL\Platforms\SQLitePlatform;
12use Doctrine\DBAL\Platforms\SQLServerPlatform;
13
14final class OptimizeFlags
15{
16 /**
17 * Platform-specific portability flags that need to be excluded from the user-provided mode
18 * since the platform already operates in this mode to avoid unnecessary conversion overhead.
19 *
20 * @var array<class-string, int>
21 */
22 private static array $platforms = [
23 DB2Platform::class => 0,
24 OraclePlatform::class => Connection::PORTABILITY_EMPTY_TO_NULL,
25 PostgreSQLPlatform::class => 0,
26 SQLitePlatform::class => 0,
27 SQLServerPlatform::class => 0,
28 ];
29
30 public function __invoke(AbstractPlatform $platform, int $flags): int
31 {
32 foreach (self::$platforms as $class => $mask) {
33 if ($platform instanceof $class) {
34 $flags &= ~$mask;
35
36 break;
37 }
38 }
39
40 return $flags;
41 }
42}