<commit_before><?php
namespace Perguntados;

use Dotenv\Dotenv;

class Base {
	protected $id;
	protected $toArray;

	public function __construct()
	{
		$conf = new Dotenv(__DIR__.'/../../');
		$conf->load();
		return $this;
	}

	/**
	 * @param string $id
	 * @return mixed $this
	 */
	public function setid($id)
	{
		$this->id = (string)$id;
		return $this;
	}

	/**
	 * @return string
	 */
	public function getId()
	{
		return (string)$this->id;
	}

	/**
	 * @return array
	 */
	public function toArray()
	{
		return $this->toArray;
	}

	/**
	 * @return string
	 */
	public function toJson()
	{
		return json_encode($this->toArray);
	}
} <commit_msg>New method id() and minor fix<commit_after><?php
namespace Perguntados;

use Dotenv\Dotenv;

class Base {
	protected $id;
	protected $toArray;

	public function __construct()
	{
		$conf = new Dotenv(__DIR__.'/../../');
		$conf->load();
		return $this;
	}

	/**
	 * @param string $id
	 * @return string
	 */
	public function id($id = NULL)
	{
		if ($id != NULL) {
			$this->id = (string)$id;
		}
		return (string)$id;
	}

	/**
	 * @param string $id
	 * @return mixed $this
	 */
	public function setId($id)
	{
		$this->id = (string)$id;
		return $this;
	}

	/**
	 * @return string
	 */
	public function getId()
	{
		return (string)$this->id;
	}

	/**
	 * @return array
	 */
	public function toArray()
	{
		return $this->toArray;
	}

	/**
	 * @return string
	 */
	public function toJson()
	{
		return json_encode($this->toArray);
	}
} 
{'fraction_non_alphanumeric': 0.18138907619689817, 'fraction_numerical': 0.0, 'mean_word_length': 2.844559585492228, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '4790024', 'n_tokens_mistral': 606, 'n_tokens_neox': 550, 'n_words': 129}