<commit_before><?php
/**
 * TagKeyFilter.php
 * Definition of class TagKeyFilter
 * 
 * Created 16-Mar-2015 16:00:55
 *
 * @author M.D.Ward <<EMAIL>>
 * @copyright (c) 2015, Byng Services Ltd
 */
namespace ElasticSearch\Filter;



/**
 * TagKeyFilter
 * 
 * @author M.D.Ward <<EMAIL>>
 */
class TagKeyFilter implements FilterInterface
{
    
    /**
     *
     * @var array
     */
    protected $replaceable;
    
    /**
     *
     * @var string
     */
    protected $replacement;
    
    
    
    /**
     * 
     * @param array $replaceable
     * @param type $replacement
     */
    public function __construct(
        array $replaceable = [' ', '-'],
        $replacement = '_'
    ) {
        $this
            ->setReplaceable($replaceable)
            ->setReplacement($replacement)
        ;
    }
    
    /**
     * 
     * @return array
     */
    public function getReplaceable()
    {
        return $this->replaceable;
    }
    
    /**
     * 
     * @return string
     */
    public function getReplacement()
    {
        return $this->replacement;
    }
    
    /**
     * 
     * @param array $replaceable
     * @return interface<commit_msg>Refactored property/field defaults on TagKeyFilter.<commit_after><?php
/**
 * TagKeyFilter.php
 * Definition of class TagKeyFilter
 * 
 * Created 16-Mar-2015 16:00:55
 *
 * @author M.D.Ward <<EMAIL>>
 * @copyright (c) 2015, Byng Services Ltd
 */
namespace ElasticSearch\Filter;



/**
 * TagKeyFilter
 * 
 * @author M.D.Ward <<EMAIL>>
 */
class TagKeyFilter implements FilterInterface
{
    
    /**
     *
     * @var array
     */
    protected $replaceable = [' ', '-'];
    
    /**
     *
     * @var string
     */
    protected $replacement = '_';
    
    
    
    /**
     * 
     * @param array $replaceable
     * @param type $replacement
     */
    public function __construct(array $replaceable = null, $replacement = null)
    {
        if ($replaceable !== null) {
            $this->setReplaceable($replaceable);
        }
        
        if ($replacement !== null) {
            $this->setReplacement($replacement);
        }
    }
    
    /**
     * 
     * @return array
     */
    public function getReplaceable()
    {
        return $this->replaceable;
    }
    
    /**
     * 
     * @return string
     */
    public function getReplacement()
    {
        return $this->replacement;
    }
    
    /**
     * 
     * @param array $replaceable
     * @return interface
{'fraction_non_alphanumeric': 0.13424989890820865, 'fraction_numerical': 0.01293974929235746, 'mean_word_length': 1.683297180043384, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, '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': '4614247', 'n_tokens_mistral': 797, 'n_tokens_neox': 756, 'n_words': 149}