<commit_before><?php

/**
 * sfRedisPluginConfiguration
 *
 * @uses      sfPluginConfiguration
 * @package   sfRedisPlugin
 * @author    <NAME> <<EMAIL>>
 * @license   The MIT License
 * @version   SVN: $Id$
 */
class sfRedisPluginConfiguration extends sfPluginConfiguration
{
  /**
   * path to config
   *
   * @var string
   */
  const CONFIG_PATH = 'config/redis.yml';

  /**
   * initialize plugin
   *
   * @access public
   * @return void
   */
  public function initialize()
  {
    try
    {
      if ($this->configuration instanceof sfApplicationConfiguration)
      {
        $configCache = $this->configuration->getConfigCache();
        $configCache->registerConfigHandler(self::CONFIG_PATH, 'sfRedisConfigHandler');
        $config = include $configCache->checkConfig(self::CONFIG_PATH);
      }
      else
      {
        $config = sfRedisConfigHandler::getConfiguration(array(
          $this->getRootDir().'/'.self::CONFIG_PATH,
          $this->configuration->getRootDir().'/'.self::CONFIG_PATH
        ));
      }
    }
    catch (sfConfigurationException $e)
    {
      $config = null;
    }

    sfRedis::initialize($config);
  }
}
<commit_msg>[sfRedisPlugin] use sfProjectconfiguration::getConfigPaths in plugin initialization<commit_after><?php

/**
 * sfRedisPlugin configuration.
 *
 * @package     sfRedisPlugin
 * @subpackage  config
 * @uses        sfPluginConfiguration
 * @author      <NAME> <<EMAIL>>
 * @license     The MIT License
 * @version     SVN: $Id$
 */
class sfRedisPluginConfiguration extends sfPluginConfiguration
{
  const VERSION = '1.0.0-DEV';

  /**
   * path to config
   *
   * @var string
   */
  const CONFIG_PATH = 'config/redis.yml';

  /**
   * initialize plugin
   *
   * @access public
   * @return void
   */
  public function initialize()
  {
    if ($this->configuration instanceof sfApplicationConfiguration)
    {
      $configCache = $this->configuration->getConfigCache();
      $configCache->registerConfigHandler(self::CONFIG_PATH, 'sfRedisConfigHandler');
      $config = include $configCache->checkConfig(self::CONFIG_PATH);
    }
    else
    {
      $configPaths = $this->configuration->getConfigPaths(self::CONFIG_PATH);
      $config = sfRedisConfigHandler::getConfiguration($configPaths);
    }

    sfRedis::initialize($config);
  }
}

{'fraction_non_alphanumeric': 0.12906019922044176, 'fraction_numerical': 0.00129926375054136, 'mean_word_length': 3.04553415061296, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, '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': '4253199', 'n_tokens_mistral': 683, 'n_tokens_neox': 675, 'n_words': 125}