<commit_before><?php

/*!
 * Config Class
 *
 * Copyright (c) 2014 <NAME>, http://dmolsen.com
 * Licensed under the MIT license
 *
 * Configures Pattern Lab by checking config files and required files
 *
 */

namespace PatternLab;

class Config {
	
	public    static $options        = array();
	protected static $userConfigPath = "/../../../config/config.ini";
	protected static $plConfigPath   = "/../../config/config.ini.default";
	protected static $cleanValues    = array("ie","id","patternStates","styleGuideExcludes");
	
	/**
	* Adds the config options to a var to be accessed from the rest of the system
	* If it's an old config or no config exists this will update and generate it.
	*/
	public static function loadOptions() {
		
		// can't add __DIR__ above so adding here
		self::$userConfigPath = __DIR__.self::$userConfigPath;
		self::$plConfigPath   = __DIR__.self::$plConfigPath;
		
		// make sure migrate doesn't happen by default
		$migrate     = false;
		$diffVersion = false;
		
		// double-check the default config file exists
		if (!file_exists(self::$plConfigPath)) {
			print "Please make sure config.ini.default exists before trying to have Pattern Lab build the config.ini file automagically.\n";<commit_msg>renamed the init to match rest of the system<commit_after><?php

/*!
 * Config Class
 *
 * Copyright (c) 2014 <NAME>, http://dmolsen.com
 * Licensed under the MIT license
 *
 * Configures Pattern Lab by checking config files and required files
 *
 */

namespace PatternLab;

class Config {
	
	public    static $options        = array();
	protected static $userConfigPath = "/../../../config/config.ini";
	protected static $plConfigPath   = "/../../config/config.ini.default";
	protected static $cleanValues    = array("ie","id","patternStates","styleGuideExcludes");
	
	/**
	* Adds the config options to a var to be accessed from the rest of the system
	* If it's an old config or no config exists this will update and generate it.
	*/
	public static function init() {
		
		// can't add __DIR__ above so adding here
		self::$userConfigPath = __DIR__.self::$userConfigPath;
		self::$plConfigPath   = __DIR__.self::$plConfigPath;
		
		// make sure migrate doesn't happen by default
		$migrate     = false;
		$diffVersion = false;
		
		// double-check the default config file exists
		if (!file_exists(self::$plConfigPath)) {
			print "Please make sure config.ini.default exists before trying to have Pattern Lab build the config.ini file automagically.\n";
{'fraction_non_alphanumeric': 0.11513687600644122, 'fraction_numerical': 0.00322061191626409, 'mean_word_length': 3.5596330275229358, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3363671', 'n_tokens_mistral': 741, 'n_tokens_neox': 686, 'n_words': 257}