Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
Configuration
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 getConfigTreeBuilder
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
2
 addCmsOptions
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
 addApiOptions
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace Apie\ApieBundle\DependencyInjection;
4
5use Apie\Common\Config\Configuration as CommonConfiguration;
6use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
7use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
9final class Configuration extends CommonConfiguration
10{
11    public function getConfigTreeBuilder(): TreeBuilder
12    {
13        $tree = parent::getConfigTreeBuilder();
14        $tree->getRootNode()
15            ->children()
16            ->booleanNode('enable_profiler')->defaultValue(true)->end()
17            ->booleanNode('enable_doctrine_bundle_connection')->defaultValue(class_exists('Apie\DoctrineEntityDatalayer\DoctrineEntityDatalayer') && class_exists('Doctrine\Bundle\DoctrineBundle\DoctrineBundle'))->end()
18            ->booleanNode('enable_security')->defaultValue(class_exists('Symfony\Bundle\SecurityBundle\SecurityBundle'))->end();
19        return $tree;
20    }
21
22    protected function addCmsOptions(ArrayNodeDefinition $arrayNode): void
23    {
24        $arrayNode->children()
25            ->scalarNode('dashboard_template')->defaultValue('@Apie/dashboard.html.twig')->end()
26            ->scalarNode('error_template')->defaultValue('@Apie/error.html.twig')->end();
27    }
28
29    protected function addApiOptions(ArrayNodeDefinition $arrayNode): void
30    {
31    }
32}