Skip to content

Commit 546b173

Browse files
author
Karel Wintersky
committed
1.1.0
- PHP7.4 & PHP8 compatible - Default charset and collate is utf8mb4 / utf8mb4_unicode_ci
1 parent 7fc0471 commit 546b173

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sources/Database/DBConfig.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class DBConfig implements DBConfigInterface
1010
{
11-
public const DEFAULT_CHARSET = 'utf8';
12-
public const DEFAULT_CHARSET_COLLATE = 'utf8_general_ci';
11+
public const DEFAULT_CHARSET = 'utf8mb4';
12+
public const DEFAULT_CHARSET_COLLATE = 'utf8mb4_unicode_ci';
1313

1414
/**
1515
* @var AbstractLogger
@@ -89,7 +89,7 @@ class DBConfig implements DBConfigInterface
8989
*/
9090
public function __construct(array $connection_config, array $options = [], LoggerInterface $logger = null)
9191
{
92-
$this->logger = \is_null($logger) ? new NullLogger() : $logger;
92+
$this->logger = $logger ?? new NullLogger();
9393

9494
if (empty($connection_config)) {
9595
$this->logger->emergency("[DBWrapper Error] Connection config is empty");
@@ -135,7 +135,7 @@ public function __construct(array $connection_config, array $options = [], Logge
135135
}
136136

137137
/**
138-
* @param $time
138+
* @param $time (float|string|int)
139139
* @param int $decimals
140140
* @param string $decimal_separator
141141
* @param string $thousands_separator

0 commit comments

Comments
 (0)