<commit_before><?php

namespace Saxulum\DoctrineMongoDb\Provider;

use Doctrine\Common\EventManager;
use Doctrine\MongoDB\Configuration;
use Doctrine\MongoDB\Connection;
use Saxulum\DoctrineMongoDb\Logger\Logger;

class DoctrineMongoDbProvider
{
    public function register(\Pimple $app)
    {
        $app['mongodb.default_options'] = array(
            'server' => 'mongodb://localhost:27017',
            'options' => array(
                'connect' => true,
                'timeout' => 5000,
                'replicaSet' => null,
                'username' => null,
                'password' => <PASSWORD>,
                'db' => null
            )
        );

        $app['mongodbs.options.initializer'] = $app->protect(function () use ($app) {
            static $initialized = false;

            if ($initialized) {
                return;
            }

            $initialized = true;

            if (!isset($app['mongodbs.options'])) {
                $app['mongodbs.options'] = array('default' => isset($app['mongodb.options']) ? $app['mongodb.options'] : array());
            }

            $tmp = $app['mongodbs.options'];
            foreach ($tmp as $name => &$options) {
                $options = array_replace_recursive($app['mongodb.default_options'], $options);

                if (!isset($app['mongodbs.default'])) {<commit_msg>remove all defaults which aren't set as default<commit_after><?php

namespace Saxulum\DoctrineMongoDb\Provider;

use Doctrine\Common\EventManager;
use Doctrine\MongoDB\Configuration;
use Doctrine\MongoDB\Connection;
use Saxulum\DoctrineMongoDb\Logger\Logger;

class DoctrineMongoDbProvider
{
    public function register(\Pimple $app)
    {
        $app['mongodb.default_options'] = array(
            'server' => 'mongodb://localhost:27017',
            'options' => array(
                'connect' => true,
            )
            /** @link http://www.php.net/manual/en/mongoclient.construct.php */
        );

        $app['mongodbs.options.initializer'] = $app->protect(function () use ($app) {
            static $initialized = false;

            if ($initialized) {
                return;
            }

            $initialized = true;

            if (!isset($app['mongodbs.options'])) {
                $app['mongodbs.options'] = array('default' => isset($app['mongodb.options']) ? $app['mongodb.options'] : array());
            }

            $tmp = $app['mongodbs.options'];
            foreach ($tmp as $name => &$options) {
                $options = array_replace_recursive($app['mongodb.default_options'], $options);

                if (!isset($app['mongodbs.default'])) {
{'fraction_non_alphanumeric': 0.14958553127354937, 'fraction_numerical': 0.0052750565184626974, 'mean_word_length': 2.130896226415094, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '6202137', 'n_tokens_mistral': 787, 'n_tokens_neox': 739, 'n_words': 131}