<commit_before><?php

namespace Slim\Views;

use Psr\Http\Message\ResponseInterface;

class FigDice
{

    /**
     * Default view variables
     *
     * @var array
     */
    protected $defaultVariables = [];

    /**
     * FigDice view instance
     *
     * @var \figdice\View
     */
    protected $view;

    /**
     * FigDice settings
     *
     * @var array
     */
    protected $settings;

    /**
     * Templates directory path
     *
     * @var string
     */
    protected $templatesPath;


    /**
     * Create new FigDice view
     *
     * @param string $templatesPath Path to templates directory
     * @param array $settings Twig environment settings
     */
    public function __construct($templatesPath = '.', $settings = [])
    {
        $this->view = new \figdice\View();
        $this->settings = $settings;
        $this->templatesPath = $templatesPath;
        if (array_key_exists('cache.path', $settings)) {
            $this->view->setTempPath($settings['cache.path']);
        } else {
            $this->view->setTempPath(sys_get_temp_dir());
        }

    }

    public function getView()
    {
        return $this->view;
    }

    /**
     * Fetches the template from disk.
     *
     * @param $template
     */
    public function fetch($template)
    {
        $this->view->loadFile($this->templatesPath . DIRECTORY_SEPARATOR . $template);
    }

    /**
     * Binds data to placeholders in template
     *
     * @param $placeholder
     * @param $data
     */
    public function bind($placeholder, $data)
    {
        $this->view->mount($placeholder, $data);
    }<commit_msg>Removed unused fetch() method<commit_after><?php

namespace Slim\Views;

use Psr\Http\Message\ResponseInterface;

class FigDice
{

    /**
     * Default view variables
     *
     * @var array
     */
    protected $defaultVariables = [];

    /**
     * FigDice view instance
     *
     * @var \figdice\View
     */
    protected $view;

    /**
     * FigDice settings
     *
     * @var array
     */
    protected $settings;

    /**
     * Templates directory path
     *
     * @var string
     */
    protected $templatesPath;

    protected $templateLoaded;


    /**
     * Create new FigDice view
     *
     * @param string $templatesPath Path to templates directory
     * @param array $settings Twig environment settings
     */
    public function __construct($templatesPath = '.', $settings = [])
    {
        $this->view = new \figdice\View();
        $this->settings = $settings;
        $this->templatesPath = $templatesPath;
        if (array_key_exists('cache.path', $settings)) {
            $this->view->setTempPath($settings['cache.path']);
        } else {
            $this->view->setTempPath(sys_get_temp_dir());
        }

    }

    /**
     * Returns the underlying FigDice View
     *
     * @return \figdice\View
     */
    puwblic function getView()
    {
        return $this->view;
    }

    /**
     * Binds data to placeholders in template
     *
     * @param $placeholder
     * @param $data
     */
    public function bind($placeholder, $data)
    {
        $this->view->mount($placeholder, $data);
    }
{'fraction_non_alphanumeric': 0.1306263770853006, 'fraction_numerical': 0.0, 'mean_word_length': 1.9317343173431734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '1949083', 'n_tokens_mistral': 952, 'n_tokens_neox': 931, 'n_words': 203}