<commit_before><?php namespace SchemaInfo\Builders;

abstract class Column
{
	/**
	 * Serves to shorten the amount of calls to $this->table->getSchema()->getBuilder()
	 * @var BuilderInterface|\Illuminate\Database\Schema\Builder|null
	 */
	protected $builder = null;
	protected $table   = null;
	protected $name    = null;
	protected $info    = null;
	
	public function __construct(TableInterface $table, $name)
	{
		$this->table   = $table;
		$this->name    = $name;
		$this->builder = $table->getSchema()->getBuilder();
	}
	
	public function info()
	{
		if ($this->info == null)
		{
			$info = $this->builder->columnInfo($this->table->getName(), $this->name);
			
			if (count($info) == false)
			{
				$name         = $this->name;
				$databaseName = $this->builder->getConnection()->getDatabaseName();
				throw new \Exception("No table [$name] exists in database [" . $databaseName . "]");
			}
			
			$this->info = reset($info);
		}
		
		return $this->info;
	}
	
	function __get($propertyName)
	{
		$info = $this->info();
		
		if (property_exists($info, $propertyName) == false)
		{
			throw new \Exception("No property [$propertyName] exists for column [" . $this->name . "]");
		}
		
		return $info->$propertyName;
	}
}
<commit_msg>removed ability to use __get magic method for column info properties.<commit_after><?php namespace SchemaInfo\Builders;

abstract class Column
{
	/**
	 * Serves to shorten the amount of calls to $this->table->getSchema()->getBuilder()
	 * @var BuilderInterface|\Illuminate\Database\Schema\Builder|null
	 */
	protected $builder = null;
	protected $table   = null;
	protected $name    = null;
	protected $info    = null;
	
	public function __construct(TableInterface $table, $name)
	{
		$this->table   = $table;
		$this->name    = $name;
		$this->builder = $table->getSchema()->getBuilder();
	}
	
	public function info()
	{
		if ($this->info == null)
		{
			$info = $this->builder->columnInfo($this->table->getName(), $this->name);
			
			if (count($info) == false)
			{
				$name         = $this->name;
				$databaseName = $this->builder->getConnection()->getDatabaseName();
				throw new \Exception("No table [$name] exists in database [" . $databaseName . "]");
			}
			
			$this->info = reset($info);
		}
		
		return $this->info;
	}
}

{'fraction_non_alphanumeric': 0.17039964866051824, 'fraction_numerical': 0.0, 'mean_word_length': 3.3723608445297506, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '1192806', 'n_tokens_mistral': 812, 'n_tokens_neox': 714, 'n_words': 167}