<commit_before><?php
/*
 * This file is part of the PommProject/Foundation package.
 *
 * (c) 2014 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PommProject\Foundation\Query;

use PommProject\Foundation\Client\ClientPooler;

class QueryPooler extends ClientPooler
{
    /**
     * getPoolerType
     *
     * @see ClientPoolerInterface
     */
    public function getPoolerType()
    {
        return 'query';
    }

    /**
     * getClientFromPool
     *
     * @see    ClientPooler
     * @return QueryInterface|null
     */
    protected function getClientFromPool($client)
    {
        return $this
            ->getSession()
            ->getClientUsingPooler($this->getPoolerType(), trim($client, "\\"))
            ;
    }

    /**
     * createClient
     *
     * @see    ClientPooler
     * @throw  FoundationException
     * @return QueryInterface
     */
    protected function createClient($client)
    {
        try {
            $reflection = new \ReflectionClass($client);

            if ($reflection->implementsInterface('\PommProject\Foundation\Query\QueryInterface') === false) {<commit_msg>Another buf in QueryPooler.<commit_after><?php
/*
 * This file is part of the PommProject/Foundation package.
 *
 * (c) 2014 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PommProject\Foundation\Query;

use PommProject\Foundation\Client\ClientPooler;

class QueryPooler extends ClientPooler
{
    /**
     * getPoolerType
     *
     * @see ClientPoolerInterface
     */
    public function getPoolerType()
    {
        return 'query';
    }

    /**
     * getClientFromPool
     *
     * @see    ClientPooler
     * @return QueryInterface|null
     */
    protected function getClientFromPool($client)
    {
        return $this
            ->getSession()
            ->getClient($this->getPoolerType(), trim($client, "\\"))
            ;
    }

    /**
     * createClient
     *
     * @see    ClientPooler
     * @throw  FoundationException
     * @return QueryInterface
     */
    protected function createClient($client)
    {
        try {
            $reflection = new \ReflectionClass($client);

            if ($reflection->implementsInterface('\PommProject\Foundation\Query\QueryInterface') === false) {
{'fraction_non_alphanumeric': 0.10939406262708418, 'fraction_numerical': 0.0032533550223668157, 'mean_word_length': 2.3560709413369714, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '1190974', 'n_tokens_mistral': 686, 'n_tokens_neox': 674, 'n_words': 159}