Completed
Pull Request — master (#2414)
by Ruud
26:32 queued 11:36
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
    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