Passed
Push — master ( bd550c...32415d )
by Grupo
02:41
created

Mapping   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 13 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: thalesmartins
5
 * Date: 03/12/2018
6
 * Time: 17:55
7
 */
8
9
namespace Saci\Console\Infrastructure\Domain\Services\PhpClass;
10
11
12
use cristianoc72\codegen\model\GenerateableInterface;
13
use cristianoc72\codegen\model\PhpClass;
14
use cristianoc72\codegen\model\PhpMethod;
15
use Saci\Console\Domain\Services\PhpClass as PhpClassInterface;
16
17
class Mapping extends PhpClass implements PhpClassInterface
18
{
19
20
    public function make(string $moduleName): GenerateableInterface
21
    {
22
        $this
23
            ->setQualifiedName("Saci\\{$moduleName}\\Mapping")
24
            ->setInterfaces(['MappingInterface'])
25
            ->setMethod(
26
                PhpMethod::create('__invoke')
27
                    ->setType('array')
28
                    ->setDescription('Retorna o mapeamento dos commands')
29
            )
30
            ->declareUse('GrupoCoqueiro\\CommandBus\\MappingInterface');
31
32
        return $this;
33
    }
34
}