original_string: public function toArray()
      {
          $content = $this->removeControlCharacters($this->getBodyContents());
  
          if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, '<xml')) {
              return XML::parse($content);
          }
  
          $array = json_decode($content, true, 512, JSON_BIGINT_AS_STRING);
  
          if (JSON_ERROR_NONE === json_last_error()) {
              return (array) $array;
          }
  
          return [];
      }
code: public function toArray()
      {
          $content = $this->removeControlCharacters($this->getBodyContents());
  
          if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, '<xml')) {
              return XML::parse($content);
          }
  
          $array = json_decode($content, true, 512, JSON_BIGINT_AS_STRING);
  
          if (JSON_ERROR_NONE === json_last_error()) {
              return (array) $array;
          }
  
          return [];
      }
code_tokens: public function toArray ( ) { $ content = $ this -> removeControlCharacters ( $ this -> getBodyContents ( ) ) ; if ( false !== stripos ( $ this -> getHeaderLine ( 'Content-Type' ) , 'xml' ) || 0 === stripos ( $ content , '<xml' ) ) { return XML :: parse ( $ content ) ; } $ array = json_decode ( $ content , true , 512 , JSON_BIGINT_AS_STRING ) ; if ( JSON_ERROR_NONE === json_last_error ( ) ) { return ( array ) $ array ; } return [ ] ; }
docstring: Build to array.
  
  @return array
docstring_tokens: Build to array .