Mapping   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 19
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 16 2
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\PhpMethod;
14
use Saci\Console\Domain\Services\PhpClass as PhpClassInterface;
15
16
class Mapping extends AbstractPhpClass implements PhpClassInterface
17
{
18
19 4
    public function make(): GenerateableInterface
20
    {
21 4
        $moduleName = $this->getModuleName();
22 4
        $className = $this->getClassName() ?: 'Mapping';
23
24
        $this
25 4
            ->setQualifiedName("Saci\\{$moduleName}\\$className")
26 4
            ->setInterfaces(['MappingInterface'])
27 4
            ->setMethod(
28 4
                PhpMethod::create('__invoke')
29 4
                    ->setType('array')
30 4
                    ->setDescription('Retorna o mapeamento dos commands')
31
            )
32 4
            ->declareUse('GrupoCoqueiro\\CommandBus\\MappingInterface');
33
34 4
        return $this;
35
    }
36
}