original_string: public function update(EntityInterface $entity)
      {
          if (!is_a($entity, $this->getEntityClass())) {
              throw new Exception('The given entity (' . get_class($entity) . ') is not compatible with this data source (' . self::class . '.');
          }
          
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $em->flush();
              
              return true;
          } catch (\Exception $e) {
              throw new Exception('Cannot update the entity"' . $entity . '".', 0, $e);
          }
      }
code: public function update(EntityInterface $entity)
      {
          if (!is_a($entity, $this->getEntityClass())) {
              throw new Exception('The given entity (' . get_class($entity) . ') is not compatible with this data source (' . self::class . '.');
          }
          
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $em->flush();
              
              return true;
          } catch (\Exception $e) {
              throw new Exception('Cannot update the entity"' . $entity . '".', 0, $e);
          }
      }
code_tokens: public function update ( EntityInterface $ entity ) { if ( ! is_a ( $ entity , $ this -> getEntityClass ( ) ) ) { throw new Exception ( 'The given entity (' . get_class ( $ entity ) . ') is not compatible with this data source (' . self :: class . '.' ) ; } try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ em -> flush ( ) ; return true ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot update the entity"' . $ entity . '".' , 0 , $ e ) ; } }
docstring: Updates the entity. Returns true if everything worked as excepted or
  false if the update didn't worked.
  
  @param \Zepi\DataSource\Core\Entity\EntityInterface $entity
  @return boolean
  
  @throws \Zepi\DataSource\Doctrine\Exception The given entity is not compatible with this data source.
  @throws \Zepi\DataSource\Doctrine\Exception Cannot update the entity "{entity}".
docstring_tokens: Updates the entity . Returns true if everything worked as excepted or false if the update didn t worked .