ConfigurationFileWriter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A write() 0 6 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