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

class SampleApp_Model_App_Account extends Model
{

	/**
	 * Timestamp of creation
	 */
	public $date_created;

        /**
         * Timestamp of last connexion
         */
        public $date_lastvisit;

	/**
	 * Timestamp of last modification
	 */
	public $date_modified;

	/**
	 * Timestamp of the email verification
	 */
	public $date_verified;

	/**
	 * Email
	 */
	public $email;

	/**
	 * EMail verified ?
	 */
	public $email_verified;

	/**
	 * Firstname
	 */
	public $firstname;

	/**
	 * Gravatar email
	 */
	public $gravatar_email;

	/**
	 * Lastname
	 */
	public $lastname;

	/**
	 * Password
	 */
	public $password;

	/**
	 * Reserved values to not return
	 */
	protected $_reserved = array();

	/**
	 * Format values
	 *
	 * @param {array} $data
	 * @return {array}
	 */
	public function format_data ( array $data )
	{
		// This is the current time
		$timestamp = time();

		// Check email verification
		if (isset($data['email_verified']))
		{
			$data['email_verified'] = true;
			$data['date_verified'] = $timestamp;
		}
		else if (!$this->email_verified)
			$data['email_verified'] = false;

		// If password found, securize it
		if (isset($data['password']))
		{
			if (strlen(trim($data['password'])) == 0)
				unset($data['password']);
			else
				$data['password'] = '**'.Password::instance()->hash($data['password']);
		}

		// Set creation time
		if (!$this->date_created)
			$data['date_created'] = $timestamp;

		// Set last visit time
		if (!$this->date_lastvisit)
			$data['date_lastvisit'] = $timestamp;

		// Store the last modification time
		$data['date_modified'] = $timestamp;

		return $data;
	}

	/**
	 * Get public loaded data
	 *
	 * @return {array}
	 */
	public function get_data ()
	{
		if (!$this->loaded())
			return array();

		// Return data
		return array(
			'id' => $this->id(),<commit_msg>make account model readable<commit_after><?php defined('SYSPATH') or die('No direct script access.');

class SampleApp_Model_App_Account extends Model
{

	/**
	 * Timestamp of creation
	 */
	public $date_created;

	/**
	 * Timestamp of last connexion
	 */
	public $date_lastvisit;

	/**
	 * Timestamp of last modification
	 */
	public $date_modified;

	/**
	 * Timestamp of the email verification
	 */
	public $date_verified;

	/**
	 * Email
	 */
	public $email;

	/**
	 * EMail verified ?
	 */
	public $email_verified;

	/**
	 * Firstname
	 */
	public $firstname;

	/**
	 * Gravatar email
	 */
	public $gravatar_email;

	/**
	 * Lastname
	 */
	public $lastname;

	/**
	 * Password
	 */
	public $password;

	/**
	 * Reserved values to not return
	 */
	protected $_reserved = array();

	/**
	 * Format values
	 *
	 * @param {array} $data
	 * @return {array}
	 */
	public function format_data ( array $data )
	{
		// This is the current time
		$timestamp = time();

		// Set creation time
		if (!$this->date_created)
			$data['date_created'] = $timestamp;

		// Set last visit time
		if (!$this->date_lastvisit)
			$data['date_lastvisit'] = $timestamp;

		// Set default email_verified values
		if (!$this->email_verified)
			$data['email_verified'] = false;

		// Check email verification
		if (isset($data['email_verified']))
		{
			$data['email_verified'] = true;
			$data['date_verified'] = $timestamp;
		}

		// If password found, securize it
		if (isset($data['password']))
		{
			if (strlen(trim($data['password'])) == 0)
				unset($data['password']);
			else
				$data['password'] = '**'.Password::instance()->hash($data['password']);
		}

		// Store the last modification time
		$data['date_modified'] = $timestamp;

		return $data;
	}

	/**
	 * Get public loaded data
	 *
	 * @return {array}
	 */
	public function get_data ()
	{
		if (!$this->loaded())
			return array();

		// Return data
		return array(
			'id' => $this->id(),
{'fraction_non_alphanumeric': 0.16610433428497276, 'fraction_numerical': 0.0005190760446405398, 'mean_word_length': 2.985522233712513, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6437034', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1238, 'n_words': 311}