<commit_before><?php

class MigrationUtils {

	public $systemDir = "./systems/";

	function getSystemsList() {

	    $list = array();
		$d = dir("./systems");
		while ($file = $d->read()) {
			if (substr($file, -4) == ".php") {
				$list[] = substr($file, 0, -4);
			}
		}
		return $list;
	}
}<commit_msg>adding to utils<commit_after><?php

class MigrationUtils {

	public $systemDir = "./systems/";
	private $systems;

	function __construct() {
		$systems = array();
	}

	function getSystemsList() {

	    $list = array();
		$d = dir("./systems");
		while ($file = $d->read()) {
			if (substr($file, -4) == ".php") {
				$list[] = substr($file, 0, -4);
			}
		}
		return $list;
	}

	/**
	 * @TODO test this
	 */
	function getSystem($name) {
		if (!isset($this->systems[$name])) {
			require_once $this->systemDir . $name . ".php";
			$s = new $name();
			$this->systems[$name] = $s;
		}
		return $this->systems[$name];
	}

}
{'fraction_non_alphanumeric': 0.22702702702702704, 'fraction_numerical': 0.006486486486486486, 'mean_word_length': 2.9572649572649574, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6372296', 'n_tokens_mistral': 397, 'n_tokens_neox': 341, 'n_words': 76}