GeneratorClass::generate()   A
last analyzed

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
 * Created by PhpStorm.
4
 * User: thalesmartins
5
 * Date: 10/12/2018
6
 * Time: 14:34
7
 */
8
9
namespace Saci\Console\Infrastructure\Domain\Services;
10
11
12
use cristianoc72\codegen\generator\CodeGenerator;
13
use cristianoc72\codegen\model\GenerateableInterface;
14
15
class GeneratorClass implements \Saci\Console\Domain\Services\GeneratorClass
16
{
17
18
    /**
19
     * @var CodeGenerator
20
     */
21
    private $generator;
22
23 9
    public function __construct(CodeGenerator $generator)
24
    {
25 9
        $this->generator = $generator;
26 9
    }
27
28 7
    public function generate(GenerateableInterface $generateable): string
29
    {
30 7
        return $this->generator->generate($generateable);
31
    }
32
}