<commit_before><?php
/**
 * Sphinx Search
 *
 * @link        https://github.com/ripaclub/zf2-sphinxsearch
 * @copyright   Copyright (c) 2014, <NAME> <<EMAIL>ato at gmail dot com>, <NAME> <me at leonardograsso dot com>
 * @license     http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */
namespace SphinxSearch\Db\Adapter\Driver\Pdo;

use Zend\Db\Adapter\Driver\Pdo\Statement as ZendPdoStatement;
use Zend\Db\Adapter\ParameterContainer;

class Statement extends ZendPdoStatement
{

    /**
     * Bind parameters from container
     */
    protected function bindParametersFromContainer()
    {
        if ($this->parametersBound) {
            return;
        }
        $parameters = $this->parameterContainer->getNamedArray();
        foreach ($parameters as $name => &$value) {
            // if param has no errata, PDO will detect the right type
            $type = null;

            if ($this->parameterContainer->offsetHasErrata($name)) {
                switch ($this->parameterContainer->offsetGetErrata($name)) {
                    case ParameterContainer::TYPE_INTEGER:
                        $type = \PDO::PARAM_INT;
                        break;
                    case ParameterContainer::TYPE_NULL:
                        $type = \PDO::PARAM_NULL;
                        break;
                    case ParameterContainer::TYPE_LOB:
                        $type = \PDO::PARAM_LOB;
                        break;
                    case (is_bool($value)):
                        $type = \PDO::PARAM_BOOL;
                        break;<commit_msg>Fixed Errata for DOUBLE<commit_after><?php
/**
 * Sphinx Search
 *
 * @link        https://github.com/ripaclub/zf2-sphinxsearch
 * @copyright   Copyright (c) 2014, <NAME> <leodidonato at gmail dot com>, <NAME> <me at leonardograsso dot com>
 * @license     http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */
namespace SphinxSearch\Db\Adapter\Driver\Pdo;

use Zend\Db\Adapter\Driver\Pdo\Statement as ZendPdoStatement;
use Zend\Db\Adapter\ParameterContainer;

class Statement extends ZendPdoStatement
{

    /**
     * Bind parameters from container
     */
    protected function bindParametersFromContainer()
    {
        if ($this->parametersBound) {
            return;
        }
        $parameters = $this->parameterContainer->getNamedArray();
        foreach ($parameters as $name => &$value) {
            // if param has no errata, PDO will detect the right type
            $type = null;

            if ($this->parameterContainer->offsetHasErrata($name)) {
                switch ($this->parameterContainer->offsetGetErrata($name)) {
                    case ParameterContainer::TYPE_INTEGER:
                        $type = \PDO::PARAM_INT;
                        break;
                    case ParameterContainer::TYPE_NULL:
                        $type = \PDO::PARAM_NULL;
                        break;
                    case ParameterContainer::TYPE_DOUBLE:
                        $value = (float) $value;
                        break;

                    //TODO: check Sphinx compatibility
                    case ParameterContainer::TYPE_LOB:
                        $type = \PDO::PARAM_LOB;
                        break;
{'fraction_non_alphanumeric': 0.1038083538083538, 'fraction_numerical': 0.0036855036855036856, 'mean_word_length': 1.7766410912190964, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 28, 'https://': 2, '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': '7317552', 'n_tokens_mistral': 878, 'n_tokens_neox': 833, 'n_words': 191}