original_string: public function getDoctypeFromConfig($config)
      {
          // recommended test
          $doctype = $config->get('HTML.Doctype');
          if (!empty($doctype)) {
              return $doctype;
          }
          $doctype = $config->get('HTML.CustomDoctype');
          if (!empty($doctype)) {
              return $doctype;
          }
          // backwards-compatibility
          if ($config->get('HTML.XHTML')) {
              $doctype = 'XHTML 1.0';
          } else {
              $doctype = 'HTML 4.01';
          }
          if ($config->get('HTML.Strict')) {
              $doctype .= ' Strict';
          } else {
              $doctype .= ' Transitional';
          }
          return $doctype;
      }
code: public function getDoctypeFromConfig($config)
      {
          // recommended test
          $doctype = $config->get('HTML.Doctype');
          if (!empty($doctype)) {
              return $doctype;
          }
          $doctype = $config->get('HTML.CustomDoctype');
          if (!empty($doctype)) {
              return $doctype;
          }
          // backwards-compatibility
          if ($config->get('HTML.XHTML')) {
              $doctype = 'XHTML 1.0';
          } else {
              $doctype = 'HTML 4.01';
          }
          if ($config->get('HTML.Strict')) {
              $doctype .= ' Strict';
          } else {
              $doctype .= ' Transitional';
          }
          return $doctype;
      }
code_tokens: public function getDoctypeFromConfig ( $ config ) { // recommended test $ doctype = $ config -> get ( 'HTML.Doctype' ) ; if ( ! empty ( $ doctype ) ) { return $ doctype ; } $ doctype = $ config -> get ( 'HTML.CustomDoctype' ) ; if ( ! empty ( $ doctype ) ) { return $ doctype ; } // backwards-compatibility if ( $ config -> get ( 'HTML.XHTML' ) ) { $ doctype = 'XHTML 1.0' ; } else { $ doctype = 'HTML 4.01' ; } if ( $ config -> get ( 'HTML.Strict' ) ) { $ doctype .= ' Strict' ; } else { $ doctype .= ' Transitional' ; } return $ doctype ; }
docstring: Retrieves the doctype from the configuration object
  @param HTMLPurifier_Config $config
  @return string
docstring_tokens: Retrieves the doctype from the configuration object