<commit_before><?php

namespace WebinoDev\Config\App;

use BjyProfiler\Db\Adapter\ProfilingAdapter;
use BjyProfiler\Db\Profiler\Profiler;
use ZendDeveloperTools\Collector\DbCollector;

/**
 * Application local config
 */
class Local
{
    /**
     * @var string
     */
    protected $dir;

    /**
     * @var array
     */
    protected $override = [];

    /**
     * @param string $dir
     * @param array $override
     */
    public function __construct($dir, array $override = [])
    {
        $this->dir      = $dir;
        $this->override = $override;
    }

    /**
     * @return array
     */
    public function toArray()
    {
        return array_replace_recursive(
            [
                'di' => [
                    'instance' => [
                        'alias' => [
                            'dbProfiler' => Profiler::class,
                        ],
                        Profiler::class => [
                            'parameters' => [
                                'enabled' => 'true',
                            ],
                        ],
                        DbCollector::class => [
                            'parameters' => [
                                'profiler' => 'dbProfiler',
                            ],
                        ],
                    ],
                ],
                'service_manager' => [
                    'factories' => [
                        'defaultDb' => function ($services) {
                            $config = $services->get('Config')['db'];
                            if (empty($config)) {
                                return null;
                            }

                            $profiler = $services->get('dbProfiler');
                            if (class_exists(ProfilingAdapter::class)) {
                                $adapter = new ProfilingAdapter($config);
                                $adapter->setProfiler($profiler);
                                $adapter->injectProfilingStatementPrototype();
                            } else {
                                $adapter = new Adapter($config);
                            }
                            return $adapter;
                        },
                    ],
                ],
                'view_manager' => [
                    'display_not_found_reason' => true,
                    'display_exceptions'       => true,
                ],
                'asset_manager' => [
                    'caching' => [
                        'default' => [
                            'cache' => 'FilePath',
                            'options' => [
                                'dir' => $this->dir . '/../../public',
                            ],
                        ],
                        'favicon.ico' => [
                            'cache' => 'Filesystem',
                            'options' => [
                                'dir' => 'tmp/cache/common/assets',
                            ],
                        ],
                    ],
                ],
            ],
            $this->override
        );
    }
}<commit_msg>Updated Config\App\Local, use fixed Filesystem cache for asset manager<commit_after><?php

namespace WebinoDev\Config\App;

use BjyProfiler\Db\Adapter\ProfilingAdapter;
use BjyProfiler\Db\Profiler\Profiler;
use WebinoDev\Assetic\Cache\FilesystemCache;
use ZendDeveloperTools\Collector\DbCollector;

/**
 * Application local config
 */
class Local
{
    /**
     * @var string
     */
    protected $dir;

    /**
     * @var array
     */
    protected $override = [];

    /**
     * @param string $dir
     * @param array $override
     */
    public function __construct($dir, array $override = [])
    {
        $this->dir      = $dir;
        $this->override = $override;
    }

    /**
     * @return array
     */
    public function toArray()
    {
        return array_replace_recursive(
            [
                'di' => [
                    'instance' => [
                        'alias' => [
                            'dbProfiler' => Profiler::class,
                        ],
                        Profiler::class    => ['parameters' => ['enabled' => 'true']],
                        DbCollector::class => ['parameters' => ['profiler' => 'dbProfiler']],
                    ],
                ],
                'service_manager' => [
                    'factories' => [
                        'defaultDb' => function ($services) {
                            $config = $services->get('Config')['db'];
                            if (empty($config)) {
                                return null;
                            }

                            $profiler = $services->get('dbProfiler');
                            if (class_exists(ProfilingAdapter::class)) {
                                $adapter = new ProfilingAdapter($config);
                                $adapter->setProfiler($profiler);
                                $adapter->injectProfilingStatementPrototype();
                            } else {
                                $adapter = new Adapter($config);
                            }
                            return $adapter;
                        },
                    ],
                ],
                'view_manager' => [
                    'display_not_found_reason' => true,
                    'display_exceptions'       => true,
                ],
                'asset_manager' => [
                    'caching' => [
                        'default' => [
                            'cache'   => 'FilePath',
                            'options' => ['dir' => $this->dir . '/../../public'],
                        ],
                        'favicon.ico' => [
                            'cache'   => FilesystemCache::class,
                            'options' => ['dir' => 'tmp/cache/common/assets'],
                        ],
                    ],
                ],
            ],
            $this->override
        );
    }
}
{'fraction_non_alphanumeric': 0.12049975341114581, 'fraction_numerical': 0.0, 'mean_word_length': 0.8375113258834189, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2118204', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1387, 'n_words': 218}