<commit_before><?php

namespace JBBCode;

/**
 * @author <NAME>
 *
 * This class represents a BBCode Definition.
 */
class CodeDefinition
{
    /* NOTE: THIS PROPERTY SHOULD ALWAYS BE LOWERCASE; USE setTagName() TO ENSURE THIS */
    protected $tagName;

    /* Whether or not this CodeDefinition uses an option parameter. */
    protected $useOption;

    /* The replacement text to be used for simple CodeDefinitions */
    protected $replacementText;

    /* Whether or not to parse elements of this definition's contents */
    protected $parseContent;

    /* How many of this element type may be nested within each other */
    protected $nestLimit;

    /* How many of this element type have been seen */
    protected $elCounter;

    /**
     * Constructs a new CodeDefinition.
     */
    public static function construct($tagName, $replacementText, $useOption = false,
                                $parseContent = true, $nestLimit = -1) {
        $def = new CodeDefinition();                            
        $def->elCounter = 0;
        $def->setTagName($tagName);
        $def->setReplacementText($replacementText);
        $def->useOption = $useOption;
        $def->parseContent = $parseContent;
        $def->nestLimit = $nestLimit;
        return $def;
     }


    /**
     * Constructs a new CodeDefinition. 
     *
     * This constructor is deprecated. You should use the static construct() method or the
     * CodeDefinitionBuilder class to construct a new CodeDefiniton.
     *
     * @deprecated
     */
    public function __construct()
    {
        /* WARNING: This function is deprecated and will be made protected in a future
         * version of jBBCode. */
        $this->parseContent = true;
        $this->useOption = false;
        $this->nestLimit = -1;

    }<commit_msg>bug fix to maintain backwards compat<commit_after><?php

namespace JBBCode;

/**
 * @author <NAME>
 *
 * This class represents a BBCode Definition.
 */
class CodeDefinition
{
    /* NOTE: THIS PROPERTY SHOULD ALWAYS BE LOWERCASE; USE setTagName() TO ENSURE THIS */
    protected $tagName;

    /* Whether or not this CodeDefinition uses an option parameter. */
    protected $useOption;

    /* The replacement text to be used for simple CodeDefinitions */
    protected $replacementText;

    /* Whether or not to parse elements of this definition's contents */
    protected $parseContent;

    /* How many of this element type may be nested within each other */
    protected $nestLimit;

    /* How many of this element type have been seen */
    protected $elCounter;

    /**
     * Constructs a new CodeDefinition.
     */
    public static function construct($tagName, $replacementText, $useOption = false,
                                $parseContent = true, $nestLimit = -1) {
        $def = new CodeDefinition();                            
        $def->elCounter = 0;
        $def->setTagName($tagName);
        $def->setReplacementText($replacementText);
        $def->useOption = $useOption;
        $def->parseContent = $parseContent;
        $def->nestLimit = $nestLimit;
        return $def;
     }


    /**
     * Constructs a new CodeDefinition. 
     *
     * This constructor is deprecated. You should use the static construct() method or the
     * CodeDefinitionBuilder class to construct a new CodeDefiniton.
     *
     * @deprecated
     */
    public function __construct()
    {
        /* WARNING: This function is deprecated and will be made protected in a future
         * version of jBBCode. */
        $this->parseContent = true;
        $this->useOption = false;
        $this->nestLimit = -1;
        $this->elCounter = 0;
    }
{'fraction_non_alphanumeric': 0.0953286257468767, 'fraction_numerical': 0.0019011406844106464, 'mean_word_length': 2.279608192341941, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 24, 'https://': 0, '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': '2311193', 'n_tokens_mistral': 1002, 'n_tokens_neox': 956, 'n_words': 339}