ConfigurationFileWriter::write()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Infrastructure\Persistence\Disk;
4
5
use PhpGitHooks\Module\Configuration\Model\ConfigurationFileWriterInterface;
6
use Symfony\Component\Yaml\Yaml;
7
8
class ConfigurationFileWriter implements ConfigurationFileWriterInterface
9
{
10
    /**
11
     * @param array $data
12
     */
13
    public function write(array $data)
14
    {
15
        $yaml = Yaml::dump($data, 5);
16
17
        file_put_contents('php-git-hooks.yml', $yaml);
18
    }
19
}
20