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

Mapping::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 1
dl 0
loc 13
rs 9.9666
c 0
b 0
f 0
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
}