<commit_before><?php
/**
 * Created by PhpStorm.
 * User: jjose00
 * Date: 11/14/17
 * Time: 3:54 PM
 */

namespace Giftcards\Encryption\CipherText\Rotator;

use Giftcards\Encryption\CipherText\Rotator\Store\StoreRegistry;
use Giftcards\Encryption\CipherText\Rotator\Store\StoreRegistryBuilder;
use Giftcards\Encryption\Encryptor;
use Giftcards\Encryption\EncryptorBuilder;
use Giftcards\Encryption\Factory\BuilderInterface;

class RotatorBuilder
{

    // <editor-fold desc="Construction and Building">
    /**
     * @return RotatorBuilder
     */
    public static function newInstance()
    {
        return new self();
    }

    /**
     * RotatorBuilder constructor.
     * @param BuilderInterface[] $storeBuilders
     */
    public function __construct($storeBuilders = array())
    {
        $this->storeRegistryBuilder = new StoreRegistryBuilder($storeBuilders);
    }

    /**
     * @return Rotator
     */
    public function build()
    {
        return new Rotator($this->buildEncryptor(), $this->buildStoreRegistry());
    }
<commit_msg>Switched to newInstance from constructor<commit_after><?php
/**
 * Created by PhpStorm.
 * User: jjose00
 * Date: 11/14/17
 * Time: 3:54 PM
 */

namespace Giftcards\Encryption\CipherText\Rotator;

use Giftcards\Encryption\CipherText\Rotator\Store\StoreRegistry;
use Giftcards\Encryption\CipherText\Rotator\Store\StoreRegistryBuilder;
use Giftcards\Encryption\Encryptor;
use Giftcards\Encryption\EncryptorBuilder;
use Giftcards\Encryption\Factory\BuilderInterface;

class RotatorBuilder
{

    // <editor-fold desc="Construction and Building">
    /**
     * @return RotatorBuilder
     */
    public static function newInstance()
    {
        return new self();
    }

    /**
     * RotatorBuilder constructor.
     * @param BuilderInterface[] $storeBuilders
     */
    public function __construct($storeBuilders = array())
    {
        $this->storeRegistryBuilder = StoreRegistryBuilder::newInstance($storeBuilders);
    }

    /**
     * @return Rotator
     */
    public function build()
    {
        return new Rotator($this->buildEncryptor(), $this->buildStoreRegistry());
    }

{'fraction_non_alphanumeric': 0.11567164179104478, 'fraction_numerical': 0.010261194029850746, 'mean_word_length': 3.3421052631578947, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3613240', 'n_tokens_mistral': 659, 'n_tokens_neox': 626, 'n_words': 121}