1
0
mirror of synced 2024-12-14 07:06:04 +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) public function clear($className = null)
{ {
if ($className !== null) { if ($className === null) {
$this->instances = array();
if (isset($this->instances[$className = trim($className, '\\')])) {
unset($this->instances[$className]);
}
return; return;
} }
$this->instances = array(); if (isset($this->instances[$className = trim($className, '\\')])) {
unset($this->instances[$className]);
}
} }
/** /**