1 | <?php |
||
7 | class RoutesGenerator extends Generator |
||
8 | { |
||
9 | public $routesPlaceholder = '//:end-routes:'; |
||
10 | |||
11 | /** |
||
12 | * Get stub name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $stub = 'routes/web'; |
||
17 | |||
18 | protected $webLumenStub = 'routes/web.lumen'; |
||
19 | |||
20 | protected $webLaravelStub = 'routes/web.laravel'; |
||
21 | |||
22 | protected $apiStub = 'routes/api'; |
||
23 | |||
24 | protected $webPathConfigNode = 'routes.web'; |
||
25 | |||
26 | protected $apiPathConfigNode = 'routes.api'; |
||
27 | |||
28 | public function run() |
||
42 | |||
43 | /** |
||
44 | * Get destination path for generated file. |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | public function getWebPath() |
||
52 | |||
53 | /** |
||
54 | * Get base path of destination file. |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getBasePath() |
||
62 | |||
63 | /** |
||
64 | * Get stub template for generated file. |
||
65 | * |
||
66 | * @param string $stub |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getStub($stub = null) |
||
80 | |||
81 | public function getReplacements() |
||
89 | |||
90 | public function getControllerName() |
||
100 | |||
101 | public function getApiPath() |
||
105 | |||
106 | public function getPathConfigNode() |
||
110 | } |
||
111 |
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.