diff --git a/src/Dibi/Drivers/SqliteDriver.php b/src/Dibi/Drivers/SqliteDriver.php index 3a339e31..68148da2 100644 --- a/src/Dibi/Drivers/SqliteDriver.php +++ b/src/Dibi/Drivers/SqliteDriver.php @@ -292,7 +292,8 @@ public function registerAggregateFunction( callable $rowCallback, callable $agrCallback, int $numArgs = -1 - ): void { + ): void + { $this->connection->createAggregate($name, $rowCallback, $agrCallback, $numArgs); } } diff --git a/src/Dibi/Translator.php b/src/Dibi/Translator.php index 3d2a4831..d28bcdb1 100644 --- a/src/Dibi/Translator.php +++ b/src/Dibi/Translator.php @@ -109,7 +109,7 @@ public function translate(array $args): string (\?) ## 11) placeholder )/xs XX -, + , [$this, 'cb'], substr($arg, $toSkip) ); @@ -448,7 +448,7 @@ public function formatValue($value, ?string $modifier): string :(\S*?:)([a-zA-Z0-9._]?) )/sx XX -, + , [$this, 'cb'], substr($value, $toSkip) ); diff --git a/src/Dibi/dibi.php b/src/Dibi/dibi.php index 4669dfd4..9b7d7880 100644 --- a/src/Dibi/dibi.php +++ b/src/Dibi/dibi.php @@ -44,8 +44,7 @@ class dibi IDENTIFIER = 'n'; /** version */ - public const - VERSION = '4.2.6'; + public const VERSION = '4.2.6'; /** sorting order */ public const diff --git a/tests/dibi/bootstrap.php b/tests/dibi/bootstrap.php index 135ec864..1d7963fb 100644 --- a/tests/dibi/bootstrap.php +++ b/tests/dibi/bootstrap.php @@ -51,7 +51,7 @@ function test(string $title, Closure $function): void /** Replaces [] with driver-specific quotes */ function reformat($s) { - global $config; + $config = $GLOBALS['config']; if (is_array($s)) { if (isset($s[$config['system']])) { return $s[$config['system']]; @@ -72,7 +72,7 @@ function reformat($s) function num($n) { - global $config; + $config = $GLOBALS['config']; if (substr($config['dsn'] ?? '', 0, 5) === 'odbc:') { $n = is_float($n) ? "$n.0" : (string) $n; }