<commit_before><?php
/**
 * Created by PhpStorm.
 * User: davis.peixoto
 * Date: 17/08/15
 * Time: 15:02
 */

namespace Davispeixoto\FeatureToggler;

use Exception;
use Noodlehaus\Config;

class FeatureToggler
{
    /**
     * @var array|string The path to config file
     */
    private $config;

    public function __construct($configFile)
    {
        try {
            $this->config = Config::load($configFile);
        } catch (Exception $e) {
            throw new FeatureTogglerException($e->getMessage());
        }
    }

    /**
     * @param string $key
     * @param bool|false $defaultValue
     * @return array|mixed|null
     */
    public function isEnabled($key, $defaultValue = false)
    {
        return $this->config->get($key, $defaultValue);
    }
}
<commit_msg>scrutinizer docs fix<commit_after><?php
/**
 * Created by PhpStorm.
 * User: davis.peixoto
 * Date: 17/08/15
 * Time: 15:02
 */

namespace Davispeixoto\FeatureToggler;

use Exception;
use Noodlehaus\Config;

class FeatureToggler
{
    /**
     * @var Config The config object
     */
    private $config;

    public function __construct($configFile)
    {
        try {
            $this->config = Config::load($configFile);
        } catch (Exception $e) {
            throw new FeatureTogglerException($e->getMessage());
        }
    }

    /**
     * @param string $key
     * @param bool|false $defaultValue
     * @return array|mixed|null
     */
    public function isEnabled($key, $defaultValue = false)
    {
        return $this->config->get($key, $defaultValue);
    }
}

{'fraction_non_alphanumeric': 0.13176320814767664, 'fraction_numerical': 0.012730744748567792, 'mean_word_length': 2.4248366013071894, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3270292', 'n_tokens_mistral': 513, 'n_tokens_neox': 495, 'n_words': 110}