1 | <?php namespace Arcanesoft\Pages\Providers; |
||
13 | class RouteServiceProvider extends ServiceProvider |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Getters & Setters |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** |
||
20 | * Get the routes namespace |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | protected function getRouteNamespace() |
||
28 | |||
29 | /** |
||
30 | * Get the auth foundation route prefix. |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | 8 | public function getFoundationPagesPrefix() |
|
40 | |||
41 | /* ------------------------------------------------------------------------------------------------ |
||
42 | | Main Functions |
||
43 | | ------------------------------------------------------------------------------------------------ |
||
44 | */ |
||
45 | /** |
||
46 | * Define the routes for the application. |
||
47 | * |
||
48 | * @param \Illuminate\Contracts\Routing\Registrar $router |
||
49 | */ |
||
50 | 8 | public function map(Router $router) |
|
55 | |||
56 | /** |
||
57 | * Define the public routes for the application. |
||
58 | * |
||
59 | * @param \Illuminate\Contracts\Routing\Registrar $router |
||
60 | */ |
||
61 | 8 | private function mapFrontEndRoutes(Router $router) |
|
69 | /** |
||
70 | * Define the foundation routes for the application. |
||
71 | * |
||
72 | * @param \Illuminate\Contracts\Routing\Registrar $router |
||
73 | */ |
||
74 | 8 | private function mapBackEndRoutes(Router $router) |
|
89 | } |
||
90 |
PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.
Let’s take a look at an example:
If we look at the
getEmail()
method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:On the hand, if we look at the
setEmail()
, this method _has_ side-effects. In the following case, we could not remove the method call: