<commit_before><?php

namespace Phactory;

class Loader
{
	private $factories;

	public function factory($name, $class)
	{
		$this->factories[$name] = $class;
	}

	public function load($name)
	{
		if (isset($this->factories[$name]))
			return new $this->factories[$name];

		$class = "{$name}Phactory";
		if (class_exists($class))
			return new $class;

		throw new Exception("Unknown factory '$name'");
	}
}<commit_msg>Fixed Phactory exception that didn't use the global namespace<commit_after><?php

namespace Phactory;

class Loader
{
	private $factories;

	public function factory($name, $class)
	{
		$this->factories[$name] = $class;
	}

	public function load($name)
	{
		if (isset($this->factories[$name]))
			return new $this->factories[$name];

		$class = "{$name}Phactory";
		if (class_exists($class))
			return new $class;

		throw new \Exception("Unknown factory '$name'");
	}
}
{'fraction_non_alphanumeric': 0.16197975253093364, 'fraction_numerical': 0.0, 'mean_word_length': 4.779220779220779, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5735635', 'n_tokens_mistral': 323, 'n_tokens_neox': 296, 'n_words': 74}