src/Entity/EntityCustomField.php
private function getEntityOnFlush($entity, $flushEntity)
    {
        if (ClassUtils::getClass($entity) == ClassUtils::getClass($flushEntity) && $entity->getId() === $flushEntity->getId()) {
            return $flushEntity;
        } else {
            return $entity;
        }
    }
private function getEntityOnFlush($entity, $flushEntity)
    {
        if (ClassUtils::getClass($entity) == ClassUtils::getClass($flushEntity) && $entity->getId() === $flushEntity->getId()) {
            return $flushEntity;
        } else {
            return $entity;
        }
    }
private function getEntityOnFlush ( $ entity , $ flushEntity ) { if ( ClassUtils :: getClass ( $ entity ) == ClassUtils :: getClass ( $ flushEntity ) && $ entity -> getId ( ) === $ flushEntity -> getId ( ) ) { return $ flushEntity ; } else { return $ entity ; } }
Checks if the two passed objects are "the same" but possibly in different states. Returns the second argument if they are the same, else the first
@param type $entity
@param type $flushEntity
@return type
Checks if the two passed objects are the same but possibly in different states . Returns the second argument if they are the same else the first