Command::setupDefinition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

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