Completed
Push — master ( 6dd3a0...ec39b9 )
by Níckolas Daniel
05:32
created

GenerateRobotsTxtFile::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace PODEntender\Application\Service\FileProcessing;
4
5
use PODEntender\Domain\Model\FileProcessing\OutputFile;
6
use PODEntender\Domain\Model\FileProcessing\RobotsTxt\RobotsTxtStringBuilder;
7
use PODEntender\Domain\Model\FileProcessing\RobotsTxt\RobotsTxt;
8
9
class GenerateRobotsTxtFile
10
{
11
    private $builder;
12
13 3
    public function __construct(RobotsTxtStringBuilder $builder)
14
    {
15 3
        $this->builder = $builder;
16 3
    }
17
18 3
    public function execute(RobotsTxt $robotsTxt, string $path) : OutputFile
19
    {
20 3
        return new OutputFile($path, $this->builder->build($robotsTxt));
21
    }
22
}
23