Permalink
Browse files

small refactoring

  • Loading branch information...
1 parent 8495eca commit 4be25cb3308e60d4d0ccfb6828fb656a4225cbb0 @FabioBatSilva committed with fabio.silva Aug 13, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php
@@ -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]);
+ }
}
/**

0 comments on commit 4be25cb

Please sign in to comment.