<commit_before><?php

namespace ByJG\DesignPattern;

use Exception;

trait Singleton
{
	protected function __construct()
	{ }

	final private function __clone()
	{
		throw new Exception('You can not clone a singleton.');
	}

	final private function __wakeup()
	{
		throw new Exception('You can not clone a singleton.');
	}

	public static function getInstance()
	{
    	static $instances;

        $calledClass = get_called_class();

		if (!isset($instances[$calledClass]))
		{
            $instances[$calledClass] = new $calledClass();
		}
		return $instances[$calledClass];
	}

}<commit_msg>Removed __wakeup from trait Singleton<commit_after><?php

namespace ByJG\DesignPattern;

use Exception;

trait Singleton
{
	protected function __construct()
	{ }

	final private function __clone()
	{
		throw new Exception('You can not clone a singleton.');
	}

	public static function getInstance()
	{
    	static $instances;

        $calledClass = get_called_class();

		if (!isset($instances[$calledClass]))
		{
            $instances[$calledClass] = new $calledClass();
		}
		return $instances[$calledClass];
	}

}
{'fraction_non_alphanumeric': 0.11701170117011701, 'fraction_numerical': 0.0, 'mean_word_length': 3.8771929824561404, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6914130', 'n_tokens_mistral': 358, 'n_tokens_neox': 342, 'n_words': 90}