1 | <?php namespace FreedomCore\TrinityCore\Character; |
||
11 | class CharacterServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Register Service Provider |
||
16 | */ |
||
17 | public function register() |
||
33 | |||
34 | /** |
||
35 | * Bootstrap the application events. |
||
36 | * @return void |
||
37 | */ |
||
38 | public function boot() |
||
41 | |||
42 | /** |
||
43 | * Load helpers. |
||
44 | */ |
||
45 | protected function loadHelpers() |
||
51 | |||
52 | /** |
||
53 | * Register the publishable files. |
||
54 | */ |
||
55 | private function registerPublishableResources() |
||
73 | |||
74 | /** |
||
75 | * Register Configuration Files |
||
76 | */ |
||
77 | public function registerConfigs() |
||
84 | |||
85 | /** |
||
86 | * Register the commands accessible from the Console. |
||
87 | */ |
||
88 | private function registerConsoleCommands() |
||
93 | |||
94 | /** |
||
95 | * Register the commands accessible from the App. |
||
96 | */ |
||
97 | private function registerAppCommands() |
||
100 | } |
||
101 |
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: