<commit_before><?php namespace BnB\ScaffoldTranslation\Classes;

use BnB\ScaffoldTranslation\Models\Settings;
use Exception;

/**
 * Base class for scaffolding templates.
 *
 * The template simply provides a file mapping property.
 *
 * @package october\support
 * @author <NAME>, <NAME>
 */
abstract class TemplateBase extends \October\Rain\Scaffold\TemplateBase
{

    protected $translated;

    /**
     * Static helper
     * @param string $path Root path to output generated files
     * @param array $vars Variables to pass to the stub templates
     * @return void
     */
    public static function make($path, $vars = [], $force = false, $translated = false)
    {
        $self = new static($path, $vars);

        if ($force)
            $self->setOverwrite(true);

        if(!$translated)
            $translated = !!Settings::get('default_mode', "0");

        $self->translated = $translated;<commit_msg>Switch to true by default.<commit_after><?php namespace BnB\ScaffoldTranslation\Classes;

use BnB\ScaffoldTranslation\Models\Settings;
use Exception;

/**
 * Base class for scaffolding templates.
 *
 * The template simply provides a file mapping property.
 *
 * @package october\support
 * @author <NAME>, <NAME>
 */
abstract class TemplateBase extends \October\Rain\Scaffold\TemplateBase
{

    protected $translated;

    /**
     * Static helper
     * @param string $path Root path to output generated files
     * @param array $vars Variables to pass to the stub templates
     * @return void
     */
    public static function make($path, $vars = [], $force = false, $translated = false)
    {
        $self = new static($path, $vars);

        if ($force)
            $self->setOverwrite(true);

        if(!$translated)
            $translated = !!Settings::get('default_mode', true);

        $self->translated = $translated;
{'fraction_non_alphanumeric': 0.1192017259978425, 'fraction_numerical': 0.0005393743257820927, 'mean_word_length': 3.015151515151515, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1039496', 'n_tokens_mistral': 534, 'n_tokens_neox': 502, 'n_words': 157}