<commit_before><?php
/**
 * A metadata container class to pass between ImThumb instances and ImThumbSource implementations
 */

class ImThumbMeta
{
	public $src;		// must be a fully resolvable URI
	public $valid = true;

	public $mtime;
	public $fileSize;
	public $mimeType = '';

	public function __construct($src = null, $mtime = null, $fileSize = null, $mimeType = '')
	{
		$this->src = $src;
		$this->mtime = $mtime;
		$this->fileSize = $fileSize;
		$this->mimeType = $mimeType;
	}<commit_msg>mark metadata invalid if constructed without a source attribute<commit_after><?php
/**
 * A metadata container class to pass between ImThumb instances and ImThumbSource implementations
 */

class ImThumbMeta
{
	public $src;		// must be a fully resolvable URI
	public $valid = true;

	public $mtime;
	public $fileSize;
	public $mimeType = '';

	public function __construct($src = null, $mtime = null, $fileSize = null, $mimeType = '')
	{
		$this->src = $src;
		$this->mtime = $mtime;
		$this->fileSize = $fileSize;
		$this->mimeType = $mimeType;

		if (!$src) {
			$this->valid = false;
		}
	}
{'fraction_non_alphanumeric': 0.13682277318640956, 'fraction_numerical': 0.0, 'mean_word_length': 3.9771689497716896, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '6474100', 'n_tokens_mistral': 391, 'n_tokens_neox': 363, 'n_words': 110}