<commit_before><?php

class CM_App_Cli extends CM_Cli_Runnable_Abstract {

	public function setup() {
		CM_App::getInstance()->setupFilesystem();
	}

	public function fillCache() {
		/** @var CM_App_Resource_Javascript_Abstract[] $resources */
		$resources = array();
		$siteClassNames = CM_Site_Abstract::getClassChildren();
		foreach ($siteClassNames as $siteClassName) {
			/** @var CM_Site_Abstract $site */
			$site = new $siteClassName();
			$resources[] = new CM_App_Resource_Javascript_Internal($site);
			$resources[] = new CM_App_Resource_Javascript_Library($site);
			$resources[] = new CM_App_Resource_Javascript_VendorAfterBody($site);
			$resources[] = new CM_App_Resource_Javascript_VendorBeforeBody($site);
		}
		foreach (new CM_Paging_Language_All() as $language) {
			$resources[] = new CM_App_Resource_Javascript_Translations($language);
		}
		foreach ($resources as $resource) {
			$resource->get(true);
		}
		$this->_getOutput()->writeln('Cached ' . count($resources) . ' resources.');
	}<commit_msg>Extend app setup command<commit_after><?php

class CM_App_Cli extends CM_Cli_Runnable_Abstract {

	public function setup() {
		$application = CM_App::getInstance();
		$application->setupFilesystem();
		$this->_getOutput()->writeln('Filesystem have been set up');
		$application->setupDatabase();
		$this->_getOutput()->writeln('Database have been set up');
	}

	public function fillCache() {
		/** @var CM_App_Resource_Javascript_Abstract[] $resources */
		$resources = array();
		$siteClassNames = CM_Site_Abstract::getClassChildren();
		foreach ($siteClassNames as $siteClassName) {
			/** @var CM_Site_Abstract $site */
			$site = new $siteClassName();
			$resources[] = new CM_App_Resource_Javascript_Internal($site);
			$resources[] = new CM_App_Resource_Javascript_Library($site);
			$resources[] = new CM_App_Resource_Javascript_VendorAfterBody($site);
			$resources[] = new CM_App_Resource_Javascript_VendorBeforeBody($site);
		}
		foreach (new CM_Paging_Language_All() as $language) {
			$resources[] = new CM_App_Resource_Javascript_Translations($language);
		}
		foreach ($resources as $resource) {
			$resource->get(true);
		}
		$this->_getOutput()->writeln('Cached ' . count($resources) . ' resources.');
	}
{'fraction_non_alphanumeric': 0.14190093708165996, 'fraction_numerical': 0.0, 'mean_word_length': 5.898461538461539, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '4786303', 'n_tokens_mistral': 768, 'n_tokens_neox': 692, 'n_words': 130}