<commit_before><?php
namespace CsvMigrations;

use Cake\Core\Configure;

trait ConfigurationTrait
{
    /**
     * Table/module configuration
     *
     * @var array
     */
    protected $_config = [];

    /**
     * Config filename
     *
     * @var string
     */
    protected $_filename = 'config';

    /**
     * Config file extension
     *
     * @var string
     */
    protected $_extension = 'ini';

    /**
     * Searchable flag
     *
     * @var boolean
     */
    protected $_searchable = true;

    /**
     * Module alias
     *
     * @var string
     */
    protected $_moduleAlias;

    /**
     * Method that sets table configuration.
     *
     * @return void
     */
    protected function _setConfiguration()
    {
        $path = Configure::read('CsvMigrations.migrations.path');
        $path .= $this->alias() . DS . $this->_filename . '.' . $this->_extension;
        if (file_exists($path)) {
            $this->_config = parse_ini_file($path, true);
        }
    }

    /**
     * Returns the searchable flag or sets a new one
     *
     * @param  bool|null $searchable sets module as (not) searchable
     * @return bool
     */
    public function searchable(bool $searchable = null)
    {
        if (!is_null($searchable)) {
            $this->_searchable = (bool)$searchable;
        }

        return $this->_searchable;
    }

    /**
     * Returns the module alias or sets a new one
     *
     * @param  string|null $alias sets a new name to be used as module alias
     * @return string
     */
    public function moduleAlias($alias = null)
    {
        if (!is_null($alias)) {
            $this->_moduleAlias = $alias;
        }

        if (is_null($this->_moduleAlias)) {
            $this->_moduleAlias = $this->alias();
        }

        return $this->_moduleAlias;
    }
}<commit_msg>remove wrong type cast, set flag to false by default (task #1610)<commit_after><?php
namespace CsvMigrations;

use Cake\Core\Configure;

trait ConfigurationTrait
{
    /**
     * Table/module configuration
     *
     * @var array
     */
    protected $_config = [];

    /**
     * Config filename
     *
     * @var string
     */
    protected $_filename = 'config';

    /**
     * Config file extension
     *
     * @var string
     */
    protected $_extension = 'ini';

    /**
     * Searchable flag
     *
     * @var boolean
     */
    protected $_searchable = false;

    /**
     * Module alias
     *
     * @var string
     */
    protected $_moduleAlias;

    /**
     * Method that sets table configuration.
     *
     * @return void
     */
    protected function _setConfiguration()
    {
        $path = Configure::read('CsvMigrations.migrations.path');
        $path .= $this->alias() . DS . $this->_filename . '.' . $this->_extension;
        if (file_exists($path)) {
            $this->_config = parse_ini_file($path, true);
        }
    }

    /**
     * Returns the searchable flag or sets a new one
     *
     * @param  bool|null $searchable sets module as (not) searchable
     * @return bool
     */
    public function searchable($searchable = null)
    {
        if (!is_null($searchable)) {
            $this->_searchable = (bool)$searchable;
        }

        return $this->_searchable;
    }

    /**
     * Returns the module alias or sets a new one
     *
     * @param  string|null $alias sets a new name to be used as module alias
     * @return string
     */
    public function moduleAlias($alias = null)
    {
        if (!is_null($alias)) {
            $this->_moduleAlias = $alias;
        }

        if (is_null($this->_moduleAlias)) {
            $this->_moduleAlias = $this->alias();
        }

        return $this->_moduleAlias;
    }
}
{'fraction_non_alphanumeric': 0.1280128548473487, 'fraction_numerical': 0.0010712372790573112, 'mean_word_length': 1.8019504876219055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '2103259', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1084, 'n_words': 272}