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

ConfigGenerator::generate()   A

Complexity

Conditions 3
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 9.6333
c 0
b 0
f 0
cc 3
nc 1
nop 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