MakeAggregatorCommand::getStub()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Scout Extended.
7
 *
8
 * (c) Algolia Team <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Algolia\ScoutExtended\Console\Commands;
15
16
use Illuminate\Console\GeneratorCommand;
17
18
final class MakeAggregatorCommand extends GeneratorCommand
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected $signature = 'scout:make-aggregator {name : The name of the aggregator}';
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected $description = 'Create a new aggregator class';
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    protected $type = 'Aggregator class';
34
35
    /**
36
     * {@inheritdoc}
37
     */
38 1
    protected function getStub(): string
39
    {
40 1
        return __DIR__.'/stubs/aggregator.stub';
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46 1
    protected function getDefaultNamespace($rootNamespace): string
47
    {
48 1
        return $rootNamespace.'\Search';
49
    }
50
}
51