original_string: public function toResponse(): Response
      {
          $base = [
              'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL,
              'return_msg' => $this->fail,
          ];
  
          $attributes = array_merge($base, $this->attributes);
  
          if ($this->sign) {
              $attributes['sign'] = Support\generate_sign($attributes, $this->app->getKey());
          }
  
          return new Response(XML::build($attributes));
      }
code: public function toResponse(): Response
      {
          $base = [
              'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL,
              'return_msg' => $this->fail,
          ];
  
          $attributes = array_merge($base, $this->attributes);
  
          if ($this->sign) {
              $attributes['sign'] = Support\generate_sign($attributes, $this->app->getKey());
          }
  
          return new Response(XML::build($attributes));
      }
code_tokens: public function toResponse ( ) : Response { $ base = [ 'return_code' => is_null ( $ this -> fail ) ? static :: SUCCESS : static :: FAIL , 'return_msg' => $ this -> fail , ] ; $ attributes = array_merge ( $ base , $ this -> attributes ) ; if ( $ this -> sign ) { $ attributes [ 'sign' ] = Support \ generate_sign ( $ attributes , $ this -> app -> getKey ( ) ) ; } return new Response ( XML :: build ( $ attributes ) ) ; }
docstring: Build xml and return the response to WeChat.
  
  @return \Symfony\Component\HttpFoundation\Response
docstring_tokens: Build xml and return the response to WeChat .