<commit_before><?php
/*
 * Fwork
 * Copyright (c) 2009 <NAME>
 *                    <NAME>
 *
 * See COPYING for license conditions.
 */

if(!defined("IN_FWORK_")) die("This file cannot be invoked directly.");

/**
 * Session manager singleton. Basically a simplistic wrapper around PHP's session_*.
 */
final class SesMan implements arrayaccess
{
	/** Instance of SesMan. */
	public static $instance;
	
	/**
	 * Create a session manager class (duh :)).
	 */
	private function __construct()
	{
		session_start();
	}
	
	/**
	 * Do not allow cloning of the session manager.
	 */
	private function __clone() { }
	
	public function offsetSet($offset, $value) {
		$_SESSION[$offset] = $value;
    }
    
    public function offsetExists($offset) {
		return isset($_SESSION[$offset]);
	}
	
	public function offsetUnset($offset) {
		unset($_SESSION[$offset]);
	}
	
	public function offsetGet($offset)
	{
		return $_SESSION[$offset];
	}
	
	/**
	 * Get the base path.
	 *
	 * @return Returns the base path.
	 */
	public static function getInstance()
	{
		if(!self::$instance)
		{
			self::$instance = new self();
		}
		
		return self::$instance;
	}
	
	/**
	 * Destroy the session manager.
	 * Does nothing.
	 */
	public function __destruct() { }
}
<commit_msg>Finished commenting sesman.php, fixes #6<commit_after><?php
/*
 * Fwork
 * Copyright (c) 2009 <NAME>
 *                    <NAME>
 *
 * See COPYING for license conditions.
 */

if(!defined("IN_FWORK_")) die("This file cannot be invoked directly.");

/**
 * Session manager singleton. Basically a simplistic wrapper around PHP's session_*.
 */
final class SesMan implements arrayaccess
{
	/** Instance of SesMan. */
	public static $instance;
	
	/**
	 * Create a session manager class (duh :)).
	 */
	private function __construct()
	{
		session_start();
	}
	
	/**
	 * Do not allow cloning of the session manager.
	 */
	private function __clone() { }
	
	/**
	 * Part of arrayaccess, see www.php.net/arrayaccess.
	 */
	public function offsetSet($offset, $value) {
		$_SESSION[$offset] = $value;
    }
    
	/**
	 * Part of arrayaccess, see www.php.net/arrayaccess.
	 */    
    public function offsetExists($offset) {
		return isset($_SESSION[$offset]);
	}

	/**
	 * Part of arrayaccess, see www.php.net/arrayaccess.
	 */
	public function offsetUnset($offset) {
		unset($_SESSION[$offset]);
	}
	
	/**
	 * Part of arrayaccess, see www.php.net/arrayaccess.
	 */
	public function offsetGet($offset)
	{
		return $_SESSION[$offset];
	}
	
	/**
	 * Get the base path.
	 *
	 * @return Returns the base path.
	 */
	public static function getInstance()
	{
		if(!self::$instance)
		{
			self::$instance = new self();
		}
		
		return self::$instance;
	}
	
	/**
	 * Destroy the session manager.
	 * Does nothing.
	 */
	public function __destruct() { }
}

{'fraction_non_alphanumeric': 0.1445480631276901, 'fraction_numerical': 0.0032281205164992827, 'mean_word_length': 2.9899856938483547, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4962944', 'n_tokens_mistral': 947, 'n_tokens_neox': 851, 'n_words': 244}