@@ -85,21 +85,21 @@ public function compile(array $config): SQL\Factory\Repository\Connection
8585 $ repository = new SQL \Factory \Repository \Connection ($ connection );
8686
8787 if (\array_key_exists ('shared ' , $ config ) && true === $ config ['shared ' ]) {
88- $ repository ->addFiles (new File ('PDOPool.php ' , new InMemory (<<<' PHP'
88+ $ repository ->addFiles (new File ('PDOPool.php ' , new InMemory (<<<PHP
8989 <?php
9090
91- namespace $ {$this->generatedNamespace};
91+ namespace {$ this ->generatedNamespace };
9292 final class PDOPool {
93- private static array $connections = [];
94- public static function unique(string $dsn, ?string $username = null, ?string $password = null, $options = []): \PDO {
95- return new \PDO($dsn, $username, $password, $options);
93+ private static array \ $connections = [];
94+ public static function unique(string \ $dsn, ?string \ $username = null, ?string \ $password = null, \ $options = []): \PDO {
95+ return new \PDO( \ $dsn, \ $username, \ $password, \ $options);
9696 }
97- public static function shared(string $dsn, ?string $username = null, ?string $password = null, $options = []): \PDO {
98- if (isset(self::$connections[$dsn])) {
99- return self::$connections[$dsn];
97+ public static function shared(string \ $dsn, ?string \ $username = null, ?string \ $password = null, \ $options = []): \PDO {
98+ if (isset(self:: \ $connections[ \ $dsn])) {
99+ return self:: \ $connections[ \ $dsn];
100100 }
101101
102- return self::$connections[$dsn] = self::unique($dsn, $username, $password, $options);
102+ return self:: \ $connections[ \ $dsn] = self::unique( \ $dsn, \ $username, \ $password, \ $options);
103103 }
104104 }
105105 PHP
0 commit comments