Completed
Pull Request — master (#2414)
by Ruud
13: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
     *
13
     * @param string $projectDir
14
     * @param bool   $overwriteSecurity
15
     * @param bool   $overwriteLiipImagine
16
     */
17
    public function generate(string $projectDir, bool $overwriteSecurity, bool $overwriteLiipImagine)
18
    {
19
        $this->renderSingleFile(
20
            $this->skeletonDir,
21
            $projectDir . '/config/packages/',
22
            'security.yaml',
23
            [],
24
            true,
25
            $overwriteSecurity ? 'security.yaml' : 'security.yaml.example'
26
        );
27
        $this->renderSingleFile(
28
            $this->skeletonDir,
29
            $projectDir . '/config/packages/',
30
            'liip_imagine.yaml',
31
            [],
32
            true,
33
            $overwriteLiipImagine ? 'liip_imagine.yaml' : 'liip_imagine.yaml.example'
34
        );
35
    }
36
}
37