Completed
Branch guard_coverage (f2aaf0)
by Pablo
03:07
created

GitIgnoreWriter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 1
cbo 1
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A write() 0 4 1
1
<?php
2
3
namespace PhpGitHooks\Module\Git\Service;
4
5
use PhpGitHooks\Module\Git\Model\WriterInterface;
6
7
class GitIgnoreWriter
8
{
9
    /**
10
     * @var WriterInterface
11
     */
12
    private $gitIgnoreWriter;
13
14
    /**
15
     * GitIgnoreWriter constructor.
16
     *
17
     * @param WriterInterface $gitIgnoreWriter
18
     */
19 1
    public function __construct(WriterInterface $gitIgnoreWriter)
20
    {
21 1
        $this->gitIgnoreWriter = $gitIgnoreWriter;
22 1
    }
23
24
    /**
25
     * @param string $content
26
     */
27 1
    public function write($content)
28
    {
29 1
        $this->gitIgnoreWriter->write($content);
30 1
    }
31
}
32