From fce6f119fb961f7799d1a5beb2c55c837e8bb37d Mon Sep 17 00:00:00 2001 From: mikeSimonson Date: Wed, 22 Feb 2017 12:57:14 +0100 Subject: [PATCH] Separating concerns (#625) The responsability of changing the value of the initialized property shouldn't be on the user of the initializeType method. --- ConnectionFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConnectionFactory.php b/ConnectionFactory.php index 537700251..46d299698 100644 --- a/ConnectionFactory.php +++ b/ConnectionFactory.php @@ -52,7 +52,6 @@ public function createConnection(array $params, Configuration $config = null, Ev { if (!$this->initialized) { $this->initializeTypes(); - $this->initialized = true; } $connection = DriverManager::getConnection($params, $config, $eventManager); @@ -85,5 +84,6 @@ private function initializeTypes() $this->commentedTypes[] = $type; } } + $this->initialized = true; } }