<commit_before><?php
/**
 *
 * This file is part of phpFastCache.
 *
 * @license MIT License (MIT)
 *
 * For full copyright and license information, please see the docs/CREDITS.txt file.
 *
 * @author <NAME> (khoaofgod)  <<EMAIL>> http://www.phpfastcache.com
 * @author Georges.L (Geolim4)  <<EMAIL>>
 *
 */
namespace phpFastCache\Cache;

use phpFastCache\Core\ExtendedCacheItemPoolTrait;
use phpFastCache\Exceptions\phpFastCacheDriverException;

/**
 * Class DriverBaseTrait
 * @package phpFastCache\Cache
 */
trait DriverBaseTrait
{
    use ExtendedCacheItemPoolTrait;

    /**
     * @var array default options, this will be merge to Driver's Options
     */
    protected $config = [];

    /**
     * @var bool
     */
    protected $fallback = false;

    /**
     * @var mixed Instance of driver service
     */
    protected $instance;

    /**
     * @param $keyword
     * @return string
     */
    protected function encodeFilename($keyword)
    {
        return md5($keyword);
    }

    /**
     * @param $config_name
     * @param string $value
     */
    public function setup($config_name, $value = '')
    {
        /**
         * Config for class
         */
        if (is_array($config_name)) {
            $this->config = array_merge($this->config, $config_name);
        } else {
            $this->config[ $config_name ] = $value;
        }<commit_msg>Removed unused method encodeFilename() on DriverBaseTrait<commit_after><?php
/**
 *
 * This file is part of phpFastCache.
 *
 * @license MIT License (MIT)
 *
 * For full copyright and license information, please see the docs/CREDITS.txt file.
 *
 * @author <NAME> (khoaofgod)  <<EMAIL>> http://www.phpfastcache.com
 * @author Georges.L (Geolim4)  <<EMAIL>>
 *
 */
namespace phpFastCache\Cache;

use phpFastCache\Core\ExtendedCacheItemPoolTrait;
use phpFastCache\Exceptions\phpFastCacheDriverException;

/**
 * Class DriverBaseTrait
 * @package phpFastCache\Cache
 */
trait DriverBaseTrait
{
    use ExtendedCacheItemPoolTrait;

    /**
     * @var array default options, this will be merge to Driver's Options
     */
    protected $config = [];

    /**
     * @var bool
     */
    protected $fallback = false;

    /**
     * @var mixed Instance of driver service
     */
    protected $instance;

    /**
     * @param $config_name
     * @param string $value
     */
    public function setup($config_name, $value = '')
    {
        /**
         * Config for class
         */
        if (is_array($config_name)) {
            $this->config = array_merge($this->config, $config_name);
        } else {
            $this->config[ $config_name ] = $value;
        }
{'fraction_non_alphanumeric': 0.1273620559334845, 'fraction_numerical': 0.0011337868480725624, 'mean_word_length': 2.469200524246396, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '241239', 'n_tokens_mistral': 821, 'n_tokens_neox': 800, 'n_words': 198}