1
0
mirror of synced 2024-12-13 14:56:01 +03:00

small refactoring

This commit is contained in:
Fabio B. Silva 2012-08-12 22:35:06 -03:00 committed by fabio.silva
parent 8495eca1a4
commit 4be25cb330

View File

@ -38,16 +38,15 @@ class DefaultEntityListenerResolver implements EntityListenerResolver
*/
public function clear($className = null)
{
if ($className !== null) {
if (isset($this->instances[$className = trim($className, '\\')])) {
unset($this->instances[$className]);
}
if ($className === null) {
$this->instances = array();
return;
}
$this->instances = array();
if (isset($this->instances[$className = trim($className, '\\')])) {
unset($this->instances[$className]);
}
}
/**