1 | <?php |
||
9 | class RepositoryMakeCommand extends GeneratorCommand |
||
10 | { |
||
11 | /** |
||
12 | * The console command name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $name = 'g:repository'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Create a new repository class'; |
||
24 | |||
25 | /** |
||
26 | * The type of class being generated. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $type = 'Repository'; |
||
31 | |||
32 | /** |
||
33 | * Get the stub file for the generator. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 1 | protected function getStub() |
|
41 | |||
42 | /** |
||
43 | * Get the default namespace for the class. |
||
44 | * |
||
45 | * @param string $rootNamespace |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | 1 | protected function getDefaultNamespace($rootNamespace) |
|
53 | |||
54 | /** |
||
55 | * Build the class with the given name. |
||
56 | * |
||
57 | * @param string $name |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | 1 | protected function buildClass($name) |
|
88 | |||
89 | /** |
||
90 | * renderServiceProvider. |
||
91 | * |
||
92 | * @param string $className |
||
93 | * @return string |
||
94 | */ |
||
95 | 1 | protected function renderServiceProvider($className) |
|
106 | |||
107 | /** |
||
108 | * Get the destination class path. |
||
109 | * |
||
110 | * @param string $name |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | 1 | protected function getPath($name) |
|
118 | |||
119 | /** |
||
120 | * Get the console command options. |
||
121 | * |
||
122 | * @return array |
||
123 | */ |
||
124 | 1 | protected function getOptions() |
|
132 | } |
||
133 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.