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