From 0ba2963ea35020cdfb102fbe4f5137c8b056a3a2 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Sun, 26 Jan 2025 23:41:23 +0100 Subject: [PATCH] Streamline coding style --- src/EntityManager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/EntityManager.php b/src/EntityManager.php index 45a4440..7c4bffa 100644 --- a/src/EntityManager.php +++ b/src/EntityManager.php @@ -416,8 +416,11 @@ final class EntityManager extends EntityManagerDecorator } ); - $baseDir = Path::canonicalize(__DIR__ . '/../'); - $dsn = str_replace('%BASEDIR%', $baseDir, Configuration::getInstance()->database); + $dsn = str_replace( + '%BASEDIR%', + Path::canonicalize(__DIR__ . '/../'), + Configuration::getInstance()->database + ); $parser = new DsnParser([ 'mariadb' => 'pdo_mysql', 'mssql' => 'pdo_sqlsrv', @@ -429,7 +432,7 @@ final class EntityManager extends EntityManagerDecorator $conn = DriverManager::getConnection( // Generic return type of DsnParser::parse() is not correctly recognized. // phpcs:ignore - $parser->parse(dsn: $dsn), + $parser->parse($dsn), $config );