RepositoryInterfaceMakeCommand::getStub()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Zebrainsteam\LaravelRepos\Console;
4
5
class RepositoryInterfaceMakeCommand extends GeneratorCommand
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $defaultNamespacePrefix = 'Contracts\Repository';
11
12
    /**
13
     * The console command name.
14
     *
15
     * @var string
16
     */
17
    protected $name = 'make:repository-interface';
18
19
    /**
20
     * The console command description.
21
     *
22
     * @var string
23
     */
24
    protected $description = 'Create a new repository interface';
25
26
    /**
27
     * The type of class being generated.
28
     *
29
     * @var string
30
     */
31
    protected $type = 'Interface';
32
33
    /**
34
     * The Composer instance.
35
     *
36
     * @var \Illuminate\Support\Composer
37
     */
38
    protected $composer;
39
40
    /**
41
     * Determine if the class already exists.
42
     *
43
     * @param  string  $rawName
44
     * @return bool
45
     */
46
    protected function alreadyExists($rawName)
47
    {
48
        return class_exists($rawName) ||
49
            $this->files->exists($this->getPath($this->qualifyClass($rawName)));
50
    }
51
52
    /**
53
     * Get the stub file for the generator.
54
     *
55
     * @return string
56
     */
57
    protected function getStub()
58
    {
59
        return __DIR__.'/stubs/repository-interface.stub';
60
    }
61
}
62