<commit_before><?php

require 'helpers/filehelper.php';

class Model {

	protected $data;

	public $isDeveloper = false;

	public $images = array();
	public $icon;
	public $logo;
	
	public $logoZip;
	public $imageZip;

	public function __construct($directory, $data) {
		$this->data = $data;
		$this->images = FileHelper::getImages('data' . (strlen($directory) > 0 ? '/' : '') . $directory . '/images');

		if($this->images != null) {
			foreach($this->images as $key => $image){
				if (Model::endsWith($image, 'logo.png')) {
					$this->logo = $image;
					unset($this->images[$key]);
				}

				if (Model::endsWith($image, 'icon.png')) {
					$this->icon = $image;
				}

				if (Model::endsWith($image, 'images.zip')) {
					$this->imageZip = $image;
					unset($this->images[$key]);
				}

				if (Model::endsWith($image, 'logo.zip')) {
					$this->logoZip = $image;
					unset($this->images[$key]);
				}
			}
		}

		if (!isset($this->icon)) $this->icon = $this->logo;

	}

	public function __get($param) {
		if (isset($this->data[$param])) {
			return $this->data[$param];
		} else {
			return null;
		}
	}

	public function __isset($param) {<commit_msg>added support for svg logos<commit_after><?php

require 'helpers/filehelper.php';

class Model {

	protected $data;

	public $isDeveloper = false;

	public $images = array();
	public $icon;
	public $logo;
	
	public $logoZip;
	public $imageZip;

	public function __construct($directory, $data) {
		$this->data = $data;
		$this->images = FileHelper::getImages('data' . (strlen($directory) > 0 ? '/' : '') . $directory . '/images');

		if($this->images != null) {
			foreach($this->images as $key => $image){
				if (Model::endsWith($image, 'logo.png') || Model::endsWith($image, 'logo.svg')) {
					$this->logo = $image;
					unset($this->images[$key]);
				}
				
				if (Model::endsWith($image, 'icon.png')) {
					$this->icon = $image;
				}

				if (Model::endsWith($image, 'images.zip')) {
					$this->imageZip = $image;
					unset($this->images[$key]);
				}

				if (Model::endsWith($image, 'logo.zip')) {
					$this->logoZip = $image;
					unset($this->images[$key]);
				}
			}
		}

		if (!isset($this->icon)) $this->icon = $this->logo;

	}

	public function __get($param) {
		if (isset($this->data[$param])) {
			return $this->data[$param];
		} else {
			return null;
		}
	}

	public function __isset($param) {
{'fraction_non_alphanumeric': 0.208911307271963, 'fraction_numerical': 0.0008406893652795292, 'mean_word_length': 3.3351548269581057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6369569', 'n_tokens_mistral': 1002, 'n_tokens_neox': 825, 'n_words': 164}