1
0
mirror of synced 2025-01-19 15:01:40 +03:00

Merge pull request #1026 from flack/patch-5

Remove some redundant clauses
This commit is contained in:
Marco Pivetta 2014-05-03 01:43:38 +02:00
commit 94837a0105

View File

@ -2553,12 +2553,6 @@ class UnitOfWork implements PropertyChangedListener
if ($entity instanceof NotifyPropertyChanged) {
$entity->addPropertyChangedListener($this);
}
// inject ObjectManager into just loaded proxies.
if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
$entity->injectObjectManager($this->em, $class);
}
} else {
$overrideLocalValues = isset($hints[Query::HINT_REFRESH]);
@ -2566,14 +2560,14 @@ class UnitOfWork implements PropertyChangedListener
if (isset($hints[Query::HINT_REFRESH_ENTITY])) {
$overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity;
}
// inject ObjectManager upon refresh.
if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
$entity->injectObjectManager($this->em, $class);
}
}
if ($overrideLocalValues) {
// inject ObjectManager upon refresh.
if ($entity instanceof ObjectManagerAware) {
$entity->injectObjectManager($this->em, $class);
}
$this->originalEntityData[$oid] = $data;
}
} else {