<commit_before><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle;

use CommonBundle\Component\Module\Config;

return Config::create(
    array(
        'namespace'         => __NAMESPACE__,
        'directory'         => __DIR__,
        'translation_files' => array('site', 'countries'),
        'has_layouts'       => true,
    ),
    array(
        'service_manager' => array(
            'factories' => array(
                'translator' => function ($serviceManager) {
                    $config = $serviceManager->get('Config');

                    return new \Zend\Mvc\I18n\Translator($config['translator']);
                },

                'authentication' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Authentication(
                        $serviceManager->get('authentication_credentialadapter'),
                        $serviceManager->get('authentication_doctrineservice')
                    );
                },
                'authentication_credentialadapter' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Adapter\Doctrine\Credential(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        'CommonBundle\Entity\User\Person',
                        'username'
                    );
                },
                'authentication_doctrineservice' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Service\Doctrine(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        'CommonBundle\Entity\User\Session',
                        2678400,
                        $serviceManager->get('authentication_sessionstorage'),
                        'Litus_Auth',
                        'Session',
                        $serviceManager->get('authentication_action')
                    );
                },
                'authentication_action' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Action\Doctrine(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        $serviceManager->get('mail_transport')
                    );
                },
                'authentication_sessionstorage' => function ($serviceManager) {
                    return new \Zend\Authentication\Storage\Session('Litus_Auth');
                },

                'common_sessionstorage' => function ($serviceManager) {
                    return new Zend\Session\Container('Litus_Common');
                },

                'AsseticBundle\Service' => 'CommonBundle\Component\Assetic\ServiceFactory',

                'doctrine.cli' => 'CommonBundle\Component\Console\ApplicationFactory',
                'litus.console_router' => 'CommonBundle\Component\Mvc\Router\Console\RouteStackFactory',
            ),
            'invokables' => array(
                'mail_transport' => 'Zend\Mail\Transport\Sendmail',
                'AsseticCacheBuster' => 'AsseticBundle\CacheBuster\LastModifiedStrategy',
            ),
            'aliases' => array(
                'litus.console_application' => 'doctrine.cli',
            ),
        ),
        'translator' => array(
            'translation_file_patterns' => array(
                array(
                    'type'     => 'phparray',
                    'base_dir' => './vendor/zendframework/zendframework/resources/languages',
                    'pattern'  => '%s/Zend_Validate.php',
                ),
            ),
        ),
        'view_manager' => array(
            'template_map' => array(
                'layout/layout' => __DIR__ . '/../layouts/layout.twig',
                'error/404'     => __DIR__ . '/../views/error/404.twig',
                'error/index'   => __DIR__ . '/../views/error/index.twig',
            ),

            'doctype' => 'HTML5',

            'not_found_template' => 'error/404',
            'exception_template' => 'error/index',

            'display_not_found_reason' => in_array(getenv('APPLICATION_ENV'), array('development', 'staging')),
            'display_exceptions'       => in_array(getenv('APPLICATION_ENV'), array('development', 'staging')),
        ),
        'assetic_configuration' => array(
            'buildOnRequest' => getenv('APPLICATION_ENV') == 'development',
            'debug' => false,
            'webPath' => __DIR__ . '/../../../../public/_assetic',
            'cacheEnabled' => true,
            'cachePath' => __DIR__ . '/../../../../data/cache',
            'basePath' => '/_assetic/',
        ),
        'assetic_filters' => array(
            'invokables' => array(
                'css'  => 'CommonBundle\Component\Assetic\Filter\Css',
                'js'   => 'CommonBundle\Component\Assetic\Filter\Js',
                'less' => 'CommonBundle\Component\Assetic\Filter\Less',
            ),
        ),
        'authentication_sessionstorage' => array(
            'namespace' => 'Litus_Auth',
            'member'    => 'storage',
        ),
        'route_manager' => array(
            'factories' => array(
                'litus_cli' => function ($serviceManager) {
                    $application = $serviceLocator->getServiceLocator()->get('litus.cli');

                    return new \DoctrineModule\Mvc\Router\Console\SymfonyCli(
                        $application,
                        array(
                            'controller' => 'DoctrineModule\Controller\Cli',
                            'action'     => 'cli',
                        )
                    );
                },
            ),
        ),
    )
);<commit_msg>removed unused configuration entry<commit_after><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle;

use CommonBundle\Component\Module\Config;

return Config::create(
    array(
        'namespace'         => __NAMESPACE__,
        'directory'         => __DIR__,
        'translation_files' => array('site', 'countries'),
        'has_layouts'       => true,
    ),
    array(
        'service_manager' => array(
            'factories' => array(
                'translator' => function ($serviceManager) {
                    $config = $serviceManager->get('Config');

                    return new \Zend\Mvc\I18n\Translator($config['translator']);
                },

                'authentication' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Authentication(
                        $serviceManager->get('authentication_credentialadapter'),
                        $serviceManager->get('authentication_doctrineservice')
                    );
                },
                'authentication_credentialadapter' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Adapter\Doctrine\Credential(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        'CommonBundle\Entity\User\Person',
                        'username'
                    );
                },
                'authentication_doctrineservice' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Service\Doctrine(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        'CommonBundle\Entity\User\Session',
                        2678400,
                        $serviceManager->get('authentication_sessionstorage'),
                        'Litus_Auth',
                        'Session',
                        $serviceManager->get('authentication_action')
                    );
                },
                'authentication_action' => function ($serviceManager) {
                    return new \CommonBundle\Component\Authentication\Action\Doctrine(
                        $serviceManager->get('doctrine.entitymanager.orm_default'),
                        $serviceManager->get('mail_transport')
                    );
                },
                'authentication_sessionstorage' => function ($serviceManager) {
                    return new \Zend\Authentication\Storage\Session('Litus_Auth');
                },

                'common_sessionstorage' => function ($serviceManager) {
                    return new Zend\Session\Container('Litus_Common');
                },

                'AsseticBundle\Service' => 'CommonBundle\Component\Assetic\ServiceFactory',

                'doctrine.cli' => 'CommonBundle\Component\Console\ApplicationFactory',
                'litus.console_router' => 'CommonBundle\Component\Mvc\Router\Console\RouteStackFactory',
            ),
            'invokables' => array(
                'mail_transport' => 'Zend\Mail\Transport\Sendmail',
                'AsseticCacheBuster' => 'AsseticBundle\CacheBuster\LastModifiedStrategy',
            ),
            'aliases' => array(
                'litus.console_application' => 'doctrine.cli',
            ),
        ),
        'translator' => array(
            'translation_file_patterns' => array(
                array(
                    'type'     => 'phparray',
                    'base_dir' => './vendor/zendframework/zendframework/resources/languages',
                    'pattern'  => '%s/Zend_Validate.php',
                ),
            ),
        ),
        'view_manager' => array(
            'template_map' => array(
                'layout/layout' => __DIR__ . '/../layouts/layout.twig',
                'error/404'     => __DIR__ . '/../views/error/404.twig',
                'error/index'   => __DIR__ . '/../views/error/index.twig',
            ),

            'doctype' => 'HTML5',

            'not_found_template' => 'error/404',
            'exception_template' => 'error/index',

            'display_not_found_reason' => in_array(getenv('APPLICATION_ENV'), array('development', 'staging')),
            'display_exceptions'       => in_array(getenv('APPLICATION_ENV'), array('development', 'staging')),
        ),
        'assetic_configuration' => array(
            'buildOnRequest' => getenv('APPLICATION_ENV') == 'development',
            'debug' => false,
            'webPath' => __DIR__ . '/../../../../public/_assetic',
            'cacheEnabled' => true,
            'cachePath' => __DIR__ . '/../../../../data/cache',
            'basePath' => '/_assetic/',
        ),
        'assetic_filters' => array(
            'invokables' => array(
                'css'  => 'CommonBundle\Component\Assetic\Filter\Css',
                'js'   => 'CommonBundle\Component\Assetic\Filter\Js',
                'less' => 'CommonBundle\Component\Assetic\Filter\Less',
            ),
        ),
        'authentication_sessionstorage' => array(
            'namespace' => 'Litus_Auth',
            'member'    => 'storage',
        ),
    )
);
{'fraction_non_alphanumeric': 0.1365322988699612, 'fraction_numerical': 0.0032045876201720357, 'mean_word_length': 1.6382647385984428, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 184, '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': '1457809', 'n_tokens_mistral': 3111, 'n_tokens_neox': 2953, 'n_words': 469}