<commit_before><?php
/**
 * @package		CleverStyle CMS
 * @author		<NAME> <<EMAIL>>
 * @copyright	Copyright (c) 2011-2015, <NAME>
 * @license		MIT License, see license.txt
 */
namespace	cs\Config;
use			cs\Config;
/**
 * Class for getting of db and storage configuration of module
 */
class Module_Properties {
	/**
	 * @var array
	 */
	protected	$module_data	= [];
	/**
	 * @var string
	 */
	protected	$module;
	/**
	 * Creating of object and saving module data inside
	 *
	 * @param array		$module_data
	 * @param string	$module
	 */
	function __construct ($module_data, $module) {
		$this->module_data	= $module_data;
		$this->module		= $module;
	}
	/**
	 * Checks, whether module is active or not
	 *
	 * @return bool
	 */
	function active () {
		return $this->module_data['active'] == 1;
	}
	/**
	 * Get db id by name
	 *
	 * @param string $db_name
	 *
	 * @return int
	 */
	function db ($db_name) {
		return $this->module_data['db'][$db_name];
	}
	/**
	 * Get storage id by name
	 *
	 * @param string $storage_name
	 *
	 * @return int
	 */
	function storage ($storage_name) {
		return $this->module_data['storage'][$storage_name];
	}
	/**
	 * Get data item of module configuration
	 *
	 * @param string		$item
	 *
	 * @return bool|mixed
	 */
	function __get ($item) {
		return $this->get($item);
	}
	/**
	 * Set data item of module configuration (only for admin)
	 *
	 * @param string	$item
	 * @param mixed		$value
	 *
	 * @return bool
	 */
	function __set ($item, $value) {
		$this->set_internal($item, $value);
	}
	/**
	 * Get data item (or array of items) of module configuration
	 *
	 * @param string|string[]	$item
	 *
	 * @return bool|mixed|mixed[]
	 */
	function get ($item) {
		if (is_array($item)) {
			$result	= [];
			foreach ($item as $i) {
				$result[$i]	= $this->get($i);
			}
			return $result;
		} elseif (isset($this->module_data['data'], $this->module_data['data'][$item])) {
			return $this->module_data['data'][$item];
		} else {
			$false = false;
			return $false;<commit_msg>PhpDoc fix<commit_after><?php
/**
 * @package		CleverStyle CMS
 * @author		<NAME> <<EMAIL>>
 * @copyright	Copyright (c) 2011-2015, <NAME>
 * @license		MIT License, see license.txt
 */
namespace	cs\Config;
use			cs\Config;
/**
 * Class for getting of db and storage configuration of module
 */
class Module_Properties {
	/**
	 * @var array
	 */
	protected	$module_data	= [];
	/**
	 * @var string
	 */
	protected	$module;
	/**
	 * Creating of object and saving module data inside
	 *
	 * @param array		$module_data
	 * @param string	$module
	 */
	function __construct ($module_data, $module) {
		$this->module_data	= $module_data;
		$this->module		= $module;
	}
	/**
	 * Checks, whether module is active or not
	 *
	 * @return bool
	 */
	function active () {
		return $this->module_data['active'] == 1;
	}
	/**
	 * Get db id by name
	 *
	 * @param string $db_name
	 *
	 * @return int
	 */
	function db ($db_name) {
		return $this->module_data['db'][$db_name];
	}
	/**
	 * Get storage id by name
	 *
	 * @param string $storage_name
	 *
	 * @return int
	 */
	function storage ($storage_name) {
		return $this->module_data['storage'][$storage_name];
	}
	/**
	 * Get data item of module configuration
	 *
	 * @param string		$item
	 *
	 * @return bool|mixed
	 */
	function __get ($item) {
		return $this->get($item);
	}
	/**
	 * Set data item of module configuration (only for admin)
	 *
	 * @param string	$item
	 * @param mixed		$value
	 */
	function __set ($item, $value) {
		$this->set_internal($item, $value);
	}
	/**
	 * Get data item (or array of items) of module configuration
	 *
	 * @param string|string[]	$item
	 *
	 * @return bool|mixed|mixed[]
	 */
	function get ($item) {
		if (is_array($item)) {
			$result	= [];
			foreach ($item as $i) {
				$result[$i]	= $this->get($i);
			}
			return $result;
		} elseif (isset($this->module_data['data'], $this->module_data['data'][$item])) {
			return $this->module_data['data'][$item];
		} else {
			$false = false;
			return $false;
{'fraction_non_alphanumeric': 0.16833918715504265, 'fraction_numerical': 0.004515805318615153, 'mean_word_length': 3.118801652892562, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 33, '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': '5924539', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1361, 'n_words': 368}