original_string: public function getTemplateHtmlAndScript()
      {
          $html = '';
          $scripts = [];
  
          /* @var Field $field */
          foreach ($this->fields() as $field) {
  
              //when field render, will push $script to Merchant
              $html .= $field->render();
  
              /*
               * Get and remove the last script of Merchant::$script stack.
               */
              if ($field->getScript()) {
                  $scripts[] = array_pop(Merchant::$script);
              }
          }
  
          return [$html, implode("\r\n", $scripts)];
      }
code: public function getTemplateHtmlAndScript()
      {
          $html = '';
          $scripts = [];
  
          /* @var Field $field */
          foreach ($this->fields() as $field) {
  
              //when field render, will push $script to Merchant
              $html .= $field->render();
  
              /*
               * Get and remove the last script of Merchant::$script stack.
               */
              if ($field->getScript()) {
                  $scripts[] = array_pop(Merchant::$script);
              }
          }
  
          return [$html, implode("\r\n", $scripts)];
      }
code_tokens: public function getTemplateHtmlAndScript ( ) { $ html = '' ; $ scripts = [ ] ; /* @var Field $field */ foreach ( $ this -> fields ( ) as $ field ) { //when field render, will push $script to Merchant $ html .= $ field -> render ( ) ; /*
               * Get and remove the last script of Merchant::$script stack.
               */ if ( $ field -> getScript ( ) ) { $ scripts [ ] = array_pop ( Merchant :: $ script ) ; } } return [ $ html , implode ( "\r\n" , $ scripts ) ] ; }
docstring: Get the html and script of template.
  
  @return array
docstring_tokens: Get the html and script of template .