original_string: public function registerAction()
      {
          $userIdentityField = $this->container->getParameter('rch_jwt_user.user_identity_field');
          $userManager = $this->container->get('fos_user.user_manager');
          $userClass = $userManager->getClass();
  
          $rules = [
              $userIdentityField => [
                  'requirements' => ['email' == $userIdentityField ? new Email() : '[^/]+'],
              ],
              'password' => ['requirements' => '[^/]+'],
          ];
  
          $params = $this->get('rch_jwt_user.credential_fetcher')
              ->create($rules)
              ->all();
  
          $user = $this->createUser($params, $userManager);
  
          return $this->renderToken($user, 201);
      }
code: public function registerAction()
      {
          $userIdentityField = $this->container->getParameter('rch_jwt_user.user_identity_field');
          $userManager = $this->container->get('fos_user.user_manager');
          $userClass = $userManager->getClass();
  
          $rules = [
              $userIdentityField => [
                  'requirements' => ['email' == $userIdentityField ? new Email() : '[^/]+'],
              ],
              'password' => ['requirements' => '[^/]+'],
          ];
  
          $params = $this->get('rch_jwt_user.credential_fetcher')
              ->create($rules)
              ->all();
  
          $user = $this->createUser($params, $userManager);
  
          return $this->renderToken($user, 201);
      }
code_tokens: public function registerAction ( ) { $ userIdentityField = $ this -> container -> getParameter ( 'rch_jwt_user.user_identity_field' ) ; $ userManager = $ this -> container -> get ( 'fos_user.user_manager' ) ; $ userClass = $ userManager -> getClass ( ) ; $ rules = [ $ userIdentityField => [ 'requirements' => [ 'email' == $ userIdentityField ? new Email ( ) : '[^/]+' ] , ] , 'password' => [ 'requirements' => '[^/]+' ] , ] ; $ params = $ this -> get ( 'rch_jwt_user.credential_fetcher' ) -> create ( $ rules ) -> all ( ) ; $ user = $ this -> createUser ( $ params , $ userManager ) ; return $ this -> renderToken ( $ user , 201 ) ; }
docstring: Register a new User and authenticate it.
  
  Required request parameters: %user_identity_field% (configured), password
  
  @return object The authentication token
docstring_tokens: Register a new User and authenticate it .