<commit_before><?php

/*
 * This file is part of gpupo/common-sdk
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Gpupo\CommonSdk;

use Gpupo\Common\Traits\SingletonTrait;
use Psr\Log\LoggerInterface;

abstract class FactoryAbstract
{
    use SingletonTrait;

    protected $config;
    protected $logger;
    protected $client;

    abstract public function getNamespace();

    public function __construct(array $config = [], LoggerInterface $logger = null)
    {
        $this->setup($config, $logger);
    }

    public function setup(array $config = [], LoggerInterface $logger = null)
    {
        $this->config = $config;
        $this->logger = $logger;
    }

    public function setClient(array $clientOptions = [])
    {
        $this->client =  new Client($clientOptions, $this->logger);
    }

    public function getDelegateSchema($key)
    {
        return $this->resolvSchema($this->getSchema($this->getNamespace()), $key);
    }

    protected function resolvSchema(array $list, $key)
    {<commit_msg>revert abstract public function setClient<commit_after><?php

/*
 * This file is part of gpupo/common-sdk
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Gpupo\CommonSdk;

use Gpupo\Common\Traits\SingletonTrait;
use Psr\Log\LoggerInterface;

abstract class FactoryAbstract
{
    use SingletonTrait;

    protected $config;
    protected $logger;
    protected $client;

    abstract public function getNamespace();

    public function __construct(array $config = [], LoggerInterface $logger = null)
    {
        $this->setup($config, $logger);
    }

    public function setup(array $config = [], LoggerInterface $logger = null)
    {
        $this->config = $config;
        $this->logger = $logger;
    }

    abstract public function setClient(array $clientOptions = []);

    public function getDelegateSchema($key)
    {
        return $this->resolvSchema($this->getSchema($this->getNamespace()), $key);
    }

    protected function resolvSchema(array $list, $key)
    {
{'fraction_non_alphanumeric': 0.11798753339269813, 'fraction_numerical': 0.0, 'mean_word_length': 3.3045977011494254, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '6055283', 'n_tokens_mistral': 655, 'n_tokens_neox': 636, 'n_words': 179}