Completed
Pull Request — master (#7)
by
unknown
02:02
created

ActionMakeCommand::getDefaultNamespace()   A

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
namespace Spatie\QueueableAction\Commands;
4
5
use Illuminate\Console\GeneratorCommand;
6
7
class ActionMakeCommand extends GeneratorCommand
8
{
9
10
	/**
11
	 * The console command name.
12
	 *
13
	 * @var string
14
	 */
15
	protected $name = 'make:action';
16
17
	/**
18
	 * The console command description.
19
	 *
20
	 * @var string
21
	 */
22
	protected $description = 'Create a new action class';
23
24
	/**
25
	 * The type of class being generated.
26
	 *
27
	 * @var string
28
	 */
29
	protected $type = 'Action';
30
31
	/**
32
	 * Get the stub file for the generator.
33
	 *
34
	 * @return string
35
	 */
36
	protected function getStub()
37
	{
38
		$stub = 'action.stub';
39
40
		return __DIR__ . '/'. $stub;
41
	}
42
43
	/**
44
	 * Get the default namespace for the class.
45
	 *
46
	 * @param  string $rootNamespace
47
	 *
48
	 * @return string
49
	 */
50
	protected function getDefaultNamespace($rootNamespace)
51
	{
52
		return $rootNamespace . '\Actions';
53
	}
54
}
55