<commit_before><?php

/**
 * WebloaderExtension
 *
 * @author <NAME> (http://jirinapravnik.cz)
 * @copyright Copyright (c) 2014, <NAME>
 */

namespace JiriNapravnik\WebLoader\DI;

class WebLoaderFilesExtension extends \Nette\DI\CompilerExtension
{

	public function beforeCompile()
	{
		$webloader = $this->compiler->getExtensions('\WebLoader\Nette\Extension')['webloader'];
		foreach ($this->compiler->getExtensions() as $extension) {
			if ($extension instanceof \JiriNapravnik\DI\IWebloaderFilesProvider) {
				$assets = $extension->getWebloaderFiles();
				foreach (['css', 'js'] as $assetsType) {
					if (isset($assets[$assetsType])) {
						foreach ($assets[$assetsType] as $name => $files) {
							$filesDef = $this->getContainerBuilder()->getDefinition($webloader->prefix($assetsType . ucfirst($name) . 'Files'));
							foreach ($files as $file) {
								$filesDef->addSetup('addFile', [$file]);
							}
						}
					}
				}
			}
		}
	}

}
<commit_msg>rename to IWebLoaderFilesProvider<commit_after><?php

/**
 * WebloaderExtension
 *
 * @author <NAME> (http://jirinapravnik.cz)
 * @copyright Copyright (c) 2014, <NAME>
 */

namespace JiriNapravnik\WebLoader\DI;

class WebLoaderFilesExtension extends \Nette\DI\CompilerExtension
{

	public function beforeCompile()
	{
		$webloader = $this->compiler->getExtensions('\WebLoader\Nette\Extension')['webloader'];
		foreach ($this->compiler->getExtensions() as $extension) {
			if ($extension instanceof IWebLoaderFilesProvider) {
				$assets = $extension->getWebloaderFiles();
				foreach (['css', 'js'] as $assetsType) {
					if (isset($assets[$assetsType])) {
						foreach ($assets[$assetsType] as $name => $files) {
							$filesDef = $this->getContainerBuilder()->getDefinition($webloader->prefix($assetsType . ucfirst($name) . 'Files'));
							foreach ($files as $file) {
								$filesDef->addSetup('addFile', [$file]);
							}
						}
					}
				}
			}
		}
	}

}

{'fraction_non_alphanumeric': 0.16925465838509315, 'fraction_numerical': 0.004140786749482402, 'mean_word_length': 3.931122448979592, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, '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': '3433202', 'n_tokens_mistral': 735, 'n_tokens_neox': 627, 'n_words': 108}