/**
  * @param LifecycleEventArgs $args
  */
 private function encrypt(LifecycleEventArgs $args)
 {
     $entity = $args->getEntity();
     $properties = $this->getAnnotatedProperties($entity);
     if (empty($properties)) {
         return;
     }
     foreach ($properties as $property) {
         $getter = $this->getGetter($property, $entity);
         $setter = $this->getSetter($property, $entity);
         if (null === $getter || null === $getter) {
             continue;
         }
         $originalValue = $entity->{$getter}();
         if ($originalValue !== null) {
             $entity->{$setter}($this->encryptor->encrypt($originalValue));
         }
     }
 }
 /**
  * @group unit
  */
 public function testDecrypt()
 {
     $this->assertEquals('alpha', $this->encryption->decrypt('+P24cXIcklfKOHOuFRkIE3WprB6W11NRZnzg8SJRGoM='));
 }