<commit_before><?php defined('SYSPATH') or die('No direct script access.');

class MustacheView
{
	protected $values;
	public $name;
	
	public function __construct($name)
	{
		$this->name = $name;
	}
	
	public function __get($key)
	{
		if (empty($this->values[$key])) return false;
		return $this->values[$key];
	}
	
	public function __set($key, $value)
	{
		if (is_object($value) && method_exists($value, '__toString')) 
		{
			$value = $value->__toString();
		}
		$this->values[$key] = $value;
	}
	
	public function __toString()
	{
		return $this->render();
	}
	
	public function __isset($key)
	{
		return (isset($this->values[$key]));
	}
	
	public function render()
	{
		$m = new Mustache;
		return $m->render($this->markup(), $this);
	}
	<commit_msg>Use isset instead of empty<commit_after><?php defined('SYSPATH') or die('No direct script access.');

class MustacheView
{
	protected $values;
	public $name;
	
	public function __construct($name)
	{
		$this->name = $name;
	}
	
	public function __get($key)
	{
		if (!isset($this->values[$key])) return false;
		return $this->values[$key];
	}
	
	public function __set($key, $value)
	{
		if (is_object($value) && method_exists($value, '__toString')) 
		{
			$value = $value->__toString();
		}
		$this->values[$key] = $value;
	}
	
	public function __toString()
	{
		return $this->render();
	}
	
	public function __isset($key)
	{
		return (isset($this->values[$key]));
	}
	
	public function render()
	{
		$m = new Mustache;
		return $m->render($this->markup(), $this);
	}
	
{'fraction_non_alphanumeric': 0.18331143232588698, 'fraction_numerical': 0.0, 'mean_word_length': 4.059800664451827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '7523331', 'n_tokens_mistral': 585, 'n_tokens_neox': 536, 'n_words': 120}