<commit_before><?php

namespace Snowflake;

class View 
{

	public $directory = 'resources/views/';

	public function render($template, array $data = null) 
	{
		$template = $this->directory . $template;

		if ( ! file_exists($template)) {
			throw new \InvalidArgumentException("The template $template was not found in $this->directory");
		} else {
			extract($data);
			ob_start();
			require $template;
			return ob_get_clean();
		}<commit_msg>- refactoring view class<commit_after><?php

namespace Snowflake;

class View 
{

	public $templateDirectory = 'resources/views/';

	public function render($template, array $data = null) 
	{
		$template = $this->templateDirectory . $template;

		if ( ! file_exists($template)) {
			throw new \InvalidArgumentException("The template $template was not found in $this->templateDirectory");
		} else {
			extract($data);
			ob_start();
			require $template;
			return ob_get_clean();
		}
{'fraction_non_alphanumeric': 0.13211600429645542, 'fraction_numerical': 0.0, 'mean_word_length': 4.265536723163842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4957733', 'n_tokens_mistral': 313, 'n_tokens_neox': 274, 'n_words': 75}