Completed
Push — master ( e5c4e9...1f2b71 )
by Matze
07:17
created

Command::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 2
crap 1
1
<?php
2
3
namespace BrainExe\Core\Annotations\Builder;
4
5
use BrainExe\Annotations\Builder\ServiceDefinition;
6
use BrainExe\Core\DependencyInjection\CompilerPass\ConsoleCompilerPass;
7
use Symfony\Component\DependencyInjection\Definition;
8
9
class Command extends ServiceDefinition
10
{
11
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function setupDefinition(Definition $definition, string $serviceId)
16 2
    {
17
        $definition->addTag(ConsoleCompilerPass::TAG);
18
        $definition->setPublic(true);
19 2
        $definition->setShared(false);
20
21 2
        return sprintf('__console.%s', $serviceId);
22 2
    }
23
}
24