original_string: public function reverseTransform($array)
      {
          $id = ArrayUtils::get($array, 'id', null);
          $umbrellaFile = $id ? $this->em->getRepository(UmbrellaFile::class)->find($id) : null;
          $uploadedFile = ArrayUtils::get($array, 'file', null);
          $delete = ArrayUtils::get($array, 'delete', false);
  
          if ($umbrellaFile && $uploadedFile) { // update
              $this->em->remove($umbrellaFile);
              return $this->manager->createUmbrellaFile($uploadedFile);
          }
  
          if ($umbrellaFile && $uploadedFile === null && $delete) { // delete
              $this->em->remove($umbrellaFile);
              return null;
          }
  
          if ($umbrellaFile === null && $uploadedFile) { // create
              return $this->manager->createUmbrellaFile($uploadedFile);
          }
  
          // nothing to do
          return $umbrellaFile;
      }
code: public function reverseTransform($array)
      {
          $id = ArrayUtils::get($array, 'id', null);
          $umbrellaFile = $id ? $this->em->getRepository(UmbrellaFile::class)->find($id) : null;
          $uploadedFile = ArrayUtils::get($array, 'file', null);
          $delete = ArrayUtils::get($array, 'delete', false);
  
          if ($umbrellaFile && $uploadedFile) { // update
              $this->em->remove($umbrellaFile);
              return $this->manager->createUmbrellaFile($uploadedFile);
          }
  
          if ($umbrellaFile && $uploadedFile === null && $delete) { // delete
              $this->em->remove($umbrellaFile);
              return null;
          }
  
          if ($umbrellaFile === null && $uploadedFile) { // create
              return $this->manager->createUmbrellaFile($uploadedFile);
          }
  
          // nothing to do
          return $umbrellaFile;
      }
code_tokens: public function reverseTransform ( $ array ) { $ id = ArrayUtils :: get ( $ array , 'id' , null ) ; $ umbrellaFile = $ id ? $ this -> em -> getRepository ( UmbrellaFile :: class ) -> find ( $ id ) : null ; $ uploadedFile = ArrayUtils :: get ( $ array , 'file' , null ) ; $ delete = ArrayUtils :: get ( $ array , 'delete' , false ) ; if ( $ umbrellaFile && $ uploadedFile ) { // update $ this -> em -> remove ( $ umbrellaFile ) ; return $ this -> manager -> createUmbrellaFile ( $ uploadedFile ) ; } if ( $ umbrellaFile && $ uploadedFile === null && $ delete ) { // delete $ this -> em -> remove ( $ umbrellaFile ) ; return null ; } if ( $ umbrellaFile === null && $ uploadedFile ) { // create return $ this -> manager -> createUmbrellaFile ( $ uploadedFile ) ; } // nothing to do return $ umbrellaFile ; }
docstring: Transform array => UmbrellaFile
  
  @param array $array
  @return UmbrellaFile|null
docstring_tokens: Transform array = > UmbrellaFile