src/Modules/Assets/AssetsDispatcher.php
public function getAssets($name, array $assets, $debug = false, $compress = true)
    {
        $assets = $this->createAssets($assets);
        $assets_collection = new AssetsCollection($assets);

        $compress_postfix = $compress ? 'min.' : '';
        $version = $assets_collection->getLastModified();

        $config = $this->container['assets'];
        $compiled_path = $config['path'] . $name . '.' . $compress_postfix . $assets_collection->getMetaType();

        if
        (
            $this->container['environment'] === 'debug' ||
            $debug ||
            (
                !file_exists($compiled_path) &&
                $this->container['environment'] === 'production'
            )
        ) {
            return $this->generateAssetsDebug($assets_collection);
        } elseif ($this->container['environment'] === 'test') {
            $this->generateAssetsTest($assets_collection, $compiled_path, $compress);
        }
        return sprintf(
            $this->templates[$assets_collection->getMetaType()],
            PathHelper::toURL($compiled_path, PUBLIC_PATH) . '?v=' . $version
        );
    }
public function getAssets($name, array $assets, $debug = false, $compress = true)
    {
        $assets = $this->createAssets($assets);
        $assets_collection = new AssetsCollection($assets);

        $compress_postfix = $compress ? 'min.' : '';
        $version = $assets_collection->getLastModified();

        $config = $this->container['assets'];
        $compiled_path = $config['path'] . $name . '.' . $compress_postfix . $assets_collection->getMetaType();

        if
        (
            $this->container['environment'] === 'debug' ||
            $debug ||
            (
                !file_exists($compiled_path) &&
                $this->container['environment'] === 'production'
            )
        ) {
            return $this->generateAssetsDebug($assets_collection);
        } elseif ($this->container['environment'] === 'test') {
            $this->generateAssetsTest($assets_collection, $compiled_path, $compress);
        }
        return sprintf(
            $this->templates[$assets_collection->getMetaType()],
            PathHelper::toURL($compiled_path, PUBLIC_PATH) . '?v=' . $version
        );
    }
TODO: check amount of files