1 | <?php |
||
7 | class ModelGenerator extends Generator |
||
8 | { |
||
9 | /** |
||
10 | * Get stub name. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $stub = 'model'; |
||
15 | |||
16 | /** |
||
17 | * Get root namespace. |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function getRootNamespace() |
||
25 | |||
26 | /** |
||
27 | * Get generator path config node. |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function getPathConfigNode() |
||
35 | |||
36 | /** |
||
37 | * Get destination path for generated file. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getPath() |
||
45 | |||
46 | /** |
||
47 | * Get base path of destination file. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getBasePath() |
||
55 | |||
56 | /** |
||
57 | * Get array replacements. |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getReplacements() |
||
68 | |||
69 | /** |
||
70 | * Get the fillable attributes. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getFillable() |
||
87 | |||
88 | /** |
||
89 | * Get schema parser. |
||
90 | * |
||
91 | * @return SchemaParser |
||
92 | */ |
||
93 | public function getSchemaParser() |
||
97 | } |
||
98 |
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.