ConfigProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 33
c 1
b 0
f 0
dl 0
loc 43
ccs 39
cts 39
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 41 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix;
6
7
use Ecodev\Felix\DBAL\EventListener\HideMigrationStorage;
8
use Ecodev\Felix\DBAL\EventListener\HideMigrationStorageFactory;
9
10
class ConfigProvider
11
{
12 34
    public function __invoke(): array
13
    {
14 34
        return [
15 34
            'signedQueries' => [
16 34
                'required' => true,
17 34
                'keys' => [],
18 34
                'allowedIps' => [],
19 34
            ],
20 34
            'logSql' => false,
21 34
            'doctrine' => [
22 34
                'configuration' => [
23 34
                    'orm_default' => [
24
                        // Log all SQL queries from Doctrine (to logs/all.log)
25 34
                        'middlewares' => [DBAL\Logging\Middleware::class],
26 34
                        'schema_assets_filter' => HideMigrationStorage::class,
27 34
                    ],
28 34
                ],
29 34
            ],
30 34
            'dependencies' => [
31 34
                'aliases' => [
32 34
                    \Doctrine\ORM\EntityManager::class => 'doctrine.entity_manager.orm_default',
33 34
                ],
34 34
                'invokables' => [
35 34
                ],
36 34
                'factories' => [
37 34
                    DBAL\Logging\Middleware::class => DBAL\Logging\MiddlewareFactory::class,
38 34
                    Log\Handler\DbHandler::class => Log\Handler\DbHandlerFactory::class,
39 34
                    I18n\Translator::class => I18n\NoTranslationFactory::class,
40 34
                    Log\RecordCompleter::class => Log\RecordCompleterFactory::class,
41 34
                    Log\Handler\MailerHandler::class => Log\Handler\MailerHandlerFactory::class,
42 34
                    Middleware\SignedQueryMiddleware::class => Middleware\SignedQueryMiddlewareFactory::class,
43 34
                    Service\ImageResizer::class => Service\ImageResizerFactory::class,
44 34
                    Service\MessageRenderer::class => Service\MessageRendererFactory::class,
45 34
                    \Imagine\Image\ImagineInterface::class => Service\ImagineFactory::class,
46 34
                    \Psr\Log\LoggerInterface::class => Log\LoggerFactory::class,
47 34
                    \Symfony\Component\Mailer\Transport\TransportInterface::class => Service\TransportFactory::class,
48 34
                    \Laminas\View\Renderer\RendererInterface::class => Service\RendererFactory::class,
49 34
                    \Doctrine\Migrations\DependencyFactory::class => \Roave\PsrContainerDoctrine\Migrations\DependencyFactoryFactory::class,
50 34
                    \Symfony\Component\Console\Application::class => Console\ApplicationFactory::class,
51 34
                    \Doctrine\Migrations\Configuration\Migration\ConfigurationLoader::class => \Roave\PsrContainerDoctrine\Migrations\ConfigurationLoaderFactory::class,
52 34
                    HideMigrationStorage::class => HideMigrationStorageFactory::class,
53 34
                ],
54 34
            ],
55 34
        ];
56
    }
57
}
58