Skip to content

Commit

Permalink
Separating concerns (#625)
Browse files Browse the repository at this point in the history
The responsability of changing the value of the initialized
property shouldn't be on the user of the initializeType method.
  • Loading branch information
mikeSimonson authored Feb 22, 2017
1 parent aed924b commit fce6f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -85,5 +84,6 @@ private function initializeTypes()
$this->commentedTypes[] = $type;
}
}
$this->initialized = true;
}
}

0 comments on commit fce6f11

Please sign in to comment.