Skip to content

Commit

Permalink
Rework code before running Rector
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jul 28, 2022
1 parent f92df8a commit ca4e6be
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,9 @@ public function __construct(
?EventManager $eventManager = null
) {
$this->_driver = $driver;
$this->params = $params;

// Create default config and event manager if none given
$config ??= new Configuration();
$eventManager ??= new EventManager();

$this->_config = $config;
$this->_eventManager = $eventManager;
$this->_config = $config ?? new Configuration();
$this->_eventManager = $eventManager ?? new EventManager();

if (isset($params['platform'])) {
if (! $params['platform'] instanceof Platforms\AbstractPlatform) {
Expand All @@ -163,6 +158,7 @@ public function __construct(
$this->platform->setEventManager($this->_eventManager);
}

$this->params = $params;
$this->autoCommit = $config->getAutoCommit();
}

Expand Down

0 comments on commit ca4e6be

Please sign in to comment.