JobMakeCommand::getDefaultNamespace()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @link https://github.com/vuongxuongminh/laravel-async
4
 *
5
 * @copyright (c) Vuong Xuong Minh
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace VXM\Async\Commands;
10
11
use Illuminate\Console\GeneratorCommand;
12
13
/**
14
 * @author Vuong Minh <[email protected]>
15
 * @since 1.0.0
16
 */
17
class JobMakeCommand extends GeneratorCommand
18
{
19
    /**
20
     * The console command name.
21
     *
22
     * @var string
23
     */
24
    protected $name = 'make:async-job';
25
26
    /**
27
     * The console command description.
28
     *
29
     * @var string
30
     */
31
    protected $description = 'Create a new async job class';
32
33
    /**
34
     * The type of class being generated.
35
     *
36
     * @var string
37
     */
38
    protected $type = 'Async job';
39
40
    /**
41
     * Get the stub file for the generator.
42
     *
43
     * @return string
44
     */
45
    protected function getStub()
46
    {
47
        return __DIR__.'/stubs/job.stub';
48
    }
49
50
    /**
51
     * Get the default namespace for the class.
52
     *
53
     * @param string $rootNamespace
54
     * @return string
55
     */
56
    protected function getDefaultNamespace($rootNamespace)
57
    {
58
        return $rootNamespace.'\AsyncJobs';
59
    }
60
}
61