GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 0bca18...1262c4 )
by Alireza
27s queued 19s
created

CreateModelCommand::getStub()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Serverfireteam\Panel\Commands;
2
3
use Illuminate\Console\GeneratorCommand;
4
use Symfony\Component\Console\Input\InputOption;
5
6
class CreateModelCommand extends GeneratorCommand {
7
8
	/**
9
	 *
10
	 * @var string the console command name
11
	 */
12
	protected $name = 'panel:createmodel';
13
        
14
       
15
16
	/**	 
17
	 *
18
	 * @var string the console command dscription
19
	 */
20
	protected $description = 'Create a new Controller model class';
21
22
	/**
23
	 * The type of class being generated.
24
	 *
25
	 * @var string indicates the type which used for GeneratorCommand
26
	 */
27
	protected $type = 'Model';
28
29
	/**
30
	 * Get the stub file for the generator.
31
	 *
32
	 * @return string
33
	 */
34
	protected function getStub()
35
	{
36
		return base_path().'/vendor/serverfireteam/panel/src/Serverfireteam/Panel/stubs/model.stub';
37
	}
38
	/**
39
	 * fire model and observer model class
40
	 * @return void
41
	 */
42
	public function handle()
43
	{
44
		parent::handle();
45
46
        $this->call('panel:createobserver', ['name' => $this->argument('name')]);
47
	}
48
49
	/**
50
	 * Get the default namespace for the class.
51
	 *
52
	 * @param  string  $rootNamespace
53
	 * @return string
54
	 */
55
	protected function getDefaultNamespace($rootNamespace)
56
	{
57
		if (!empty(\Config::get('panel.modelPath'))) {
58
			return $rootNamespace . '\\' . \Config::get('panel.modelPath');
59
		}
60
		else {
61
			return $rootNamespace;
62
		}
63
	}
64
65
}
66