Completed
Pull Request — master (#2414)
by Ruud
26:32 queued 11:36
created

ConfigGenerator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 19 3
1
<?php
2
3
namespace Kunstmaan\GeneratorBundle\Generator;
4
5
/**
6
 * Generates all config files
7
 */
8
class ConfigGenerator extends KunstmaanGenerator
9
{
10
    /**
11
     * Generate all config files.
12
     */
13
    public function generate(string $projectDir, bool $overwriteSecurity, bool $overwriteLiipImagine)
14
    {
15
        $this->renderSingleFile(
16
            $this->skeletonDir,
17
            $projectDir . '/config/packages/',
18
            'security.yaml',
19
            [],
20
            true,
21
            $overwriteSecurity ? 'security.yaml' : 'security.yaml.example'
22
        );
23
        $this->renderSingleFile(
24
            $this->skeletonDir,
25
            $projectDir . '/config/packages/',
26
            'liip_imagine.yaml',
27
            [],
28
            true,
29
            $overwriteSecurity ? 'liip_imagine.yaml' : 'liip_imagine.yaml.example'
30
        );
31
    }
32
}
33