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