Passed
Push — master ( e91214...4bd70e )
by Grupo
06:18
created

GeneratorClass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 3 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
    public function __construct(CodeGenerator $generator)
24
    {
25
        $this->generator = $generator;
26
    }
27
28
    public function create(GenerateableInterface $generateable): string
29
    {
30
        return $this->generator->generate($generateable);
31
    }
32
}