Completed
Pull Request — master (#2414)
by Ruud
15:25
created

ConfigGenerator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 28
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
     * @param string $projectDir
13
     * @param bool $overwriteSecurity
14
     * @param bool $overwriteLiipImagine
15
     */
16
    public function generate(string $projectDir, bool $overwriteSecurity, bool $overwriteLiipImagine)
17
    {
18
        $this->renderSingleFile(
19
            $this->skeletonDir,
20
            $projectDir . '/config/packages/',
21
            'security.yaml',
22
            [],
23
            true,
24
            $overwriteSecurity ? 'security.yaml' : 'security.yaml.example'
25
        );
26
        $this->renderSingleFile(
27
            $this->skeletonDir,
28
            $projectDir . '/config/packages/',
29
            'liip_imagine.yaml',
30
            [],
31
            true,
32
            $overwriteLiipImagine ? 'liip_imagine.yaml' : 'liip_imagine.yaml.example'
33
        );
34
    }
35
}
36