<commit_before><?php

namespace Zend\Filter\Word\Service;

use Zend\ServiceManager\Exception\ServiceNotCreatedException;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Filter\Word\SeparatorToSeparator;

class SeparatorToSeparatorFactory implements FactoryInterface
{
    /**
     * @var array
     */
    protected $options;

    /**
     * Constructor.
     *
     * @param array $options
     */
    public function __construct(array $options = array())
    {
        $this->options = $options;
    }

    /**
     * {@inheritDoc}
     *
     * @return SeparatorToSeparator
     * @throws ServiceNotCreatedException if Controllermanager service is not found in application service locator
     */
    public function createService(ServiceLocatorInterface $plugins)
    {
        return new SeparatorToSeparator(
            isset($this->options['search_separator']) ? $this->options['search_separator'] : ' ',
            isset($this->options['replacement_separator']) ? $this->options['replacement_separator'] : '-'
        );
    }
}<commit_msg>use MutableCreationOptionsTrait and MutableCreationOptionsInterface<commit_after><?php

namespace Zend\Filter\Word\Service;

use Zend\Filter\Word\SeparatorToSeparator;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\MutableCreationOptionsInterface;
use Zend\ServiceManager\MutableCreationOptionsTrait;
use Zend\ServiceManager\ServiceLocatorInterface;

class SeparatorToSeparatorFactory implements
    FactoryInterface,
    MutableCreationOptionsInterface
{
    use MutableCreationOptionsTrait;

    /**
     * Constructor.
     *
     * @param array $options
     */
    public function __construct(array $options = array())
    {
        $this->setCreationOptions($options);
    }

    /**
     * {@inheritDoc}
     *
     * @return SeparatorToSeparator
     * @throws ServiceNotCreatedException if Controllermanager service is not found in application service locator
     */
    public function createService(ServiceLocatorInterface $plugins)
    {
        return new SeparatorToSeparator(
            isset($this->creationOptions['search_separator']) ? $this->creationOptions['search_separator'] : ' ',
            isset($this->creationOptions['replacement_separator']) ? $this->creationOptions['replacement_separator'] : '-'
        );
    }
}
{'fraction_non_alphanumeric': 0.10219594594594594, 'fraction_numerical': 0.0, 'mean_word_length': 3.63600782778865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6712971', 'n_tokens_mistral': 632, 'n_tokens_neox': 618, 'n_words': 115}