<commit_before><?php
/**
 * RocketPHP (http://rocketphp.io)
 *
 * @package   RocketPHP
 * @link      https://github.com/rocketphp/html
 * @license   http://opensource.org/licenses/MIT MIT
 */

namespace RocketPHP\HTML;

/**
 * Declaration 
 *
 * Creates a declaration node.
 */
class Declaration
extends Node_Abstract
{
    /** 
     * @var string Output
     */
    protected $_output;

    /**
     * Constructor
     *
     * @param string      $name  Name
     * @param null|string $value Data
     */
    public function __construct($name, $data = null)
    { 
        switch ($name) {
            case 'doctype':
                $data = isset($data) ? $data : 'html';
                $this->_output = "<!DOCTYPE $data>\n"; 
                break;
            case 'comment':
                $data = isset($data) ? $data : "";
                $this->_output = "<!-- $data -->\n"; 
                break;
            default:
                throw new BadMethodCallException(
                    "Unknown HTML declaration", 
                    1
                );
                break;
        }
    } 

    /**
     * Return text output
     *
     * @return string HTML
     */ 
    public function output() 
    {
        return $this->_output;
    }

}<commit_msg>Add access phpDocumentor tag to _output<commit_after><?php
/**
 * RocketPHP (http://rocketphp.io)
 *
 * @package   RocketPHP
 * @link      https://github.com/rocketphp/html
 * @license   http://opensource.org/licenses/MIT MIT
 */

namespace RocketPHP\HTML;

/**
 * Declaration 
 *
 * Creates a declaration node.
 */
class Declaration
extends Node_Abstract
{
    /** 
     * @access protected
     * @var    string Output
     */
    protected $_output;

    /**
     * Constructor
     *
     * @param string      $name  Name
     * @param null|string $value Data
     */
    public function __construct($name, $data = null)
    { 
        switch ($name) {
            case 'doctype':
                $data = isset($data) ? $data : 'html';
                $this->_output = "<!DOCTYPE $data>\n"; 
                break;
            case 'comment':
                $data = isset($data) ? $data : "";
                $this->_output = "<!-- $data -->\n"; 
                break;
            default:
                throw new BadMethodCallException(
                    "Unknown HTML declaration", 
                    1
                );
                break;
        }
    } 

    /**
     * Return text output
     *
     * @return string HTML
     */ 
    public function output() 
    {
        return $this->_output;
    }

}
{'fraction_non_alphanumeric': 0.12980030721966207, 'fraction_numerical': 0.0007680491551459293, 'mean_word_length': 1.3833485818847209, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5244698', 'n_tokens_mistral': 765, 'n_tokens_neox': 714, 'n_words': 169}