<commit_before><?php

    namespace Dez\Db;

    use Dez\Config\Config;

    /**
     * Class Connection
     * @package Dez\Db
     */
    class Connection extends \PDO implements ConnectionInterface {

        /**
         * @var int
         */
        protected $affectedRows     = 0;

        /**
         * @var null
         */
        static protected $config    = null;

        /**
         * @var null
         */
        static protected $schema    = null;

        /**
         * @param Config $config
         * @throws Exception
         */
        public function __construct( Config $config ) {

            $this->setConfig( $config );

            try {
                @ parent::__construct (
                    $config->get( 'dsn' ),
                    $config->get( 'user' ),
                    $config->get( 'password' ),
                    [
                        parent::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
                    ]
                );
            } catch ( \Exception $e ) {
                throw new Exception( $e->getMessage() );
            }

            $this->setAttribute( static::ATTR_ERRMODE,            static::ERRMODE_EXCEPTION );
            $this->setAttribute( static::ATTR_CURSOR,             static::CURSOR_SCROLL );
            $this->setAttribute( static::ATTR_STATEMENT_CLASS,    [ __NAMESPACE__ .'\Stmt', [ $this ] ] );

            if( $config->get( 'use_schema' ) == 1 ) {
                $this->initSchema();
            }
        }

        /**
         * @param Config $config
         * @return $this
         */
        public function setConfig( Config $config ) {
            static::$config     = $config;
            return $this;
        }

        /**
         * @return Config
         */
        public function getConfig() {
            return static::$config;
        }

        /**
         * @return Schema
         */
        public function getSchema() {
            return static::$schema;<commit_msg>fix schema<commit_after><?php

    namespace Dez\Db;

    use Dez\Config\Config;

    /**
     * Class Connection
     * @package Dez\Db
     */
    class Connection extends \PDO implements ConnectionInterface {

        /**
         * @var int
         */
        protected $affectedRows     = 0;

        /**
         * @var null
         */
        static protected $config    = null;

        /**
         * @var null
         */
        static protected $schema    = null;

        /**
         * @param Config $config
         * @throws Exception
         */
        public function __construct( Config $config ) {

            $this->setConfig( $config );

            try {
                @ parent::__construct (
                    $config->get( 'dsn' ),
                    $config->get( 'user' ),
                    $config->get( 'password' ),
                    [
                        parent::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
                    ]
                );
            } catch ( \Exception $e ) {
                throw new Exception( $e->getMessage() );
            }

            $this->setAttribute( static::ATTR_ERRMODE,            static::ERRMODE_EXCEPTION );
            $this->setAttribute( static::ATTR_CURSOR,             static::CURSOR_SCROLL );
            $this->setAttribute( static::ATTR_STATEMENT_CLASS,    [ __NAMESPACE__ .'\Stmt', [ $this ] ] );

            $this->initSchema();
        }

        /**
         * @param Config $config
         * @return $this
         */
        public function setConfig( Config $config ) {
            static::$config     = $config;
            return $this;
        }

        /**
         * @return Config
         */
        public function getConfig() {
            return static::$config;
        }

        /**
         * @return Schema
         */
        public function getSchema() {
            return static::$schema;
{'fraction_non_alphanumeric': 0.11928480204342273, 'fraction_numerical': 0.001277139208173691, 'mean_word_length': 1.1731409544950056, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, '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': '5485720', 'n_tokens_mistral': 1016, 'n_tokens_neox': 986, 'n_words': 210}