Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 11 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
32 | View Code Duplication | private function loadViewsFromContainers() |
|
33 | { |
||
34 | foreach (PortButler::getContainersNames() as $containerName) { |
||
35 | |||
36 | $containerViewDirectory = base_path('app/Containers/' . $containerName . '/UI/WEB/Views/'); |
||
37 | |||
38 | if (File::isDirectory($containerViewDirectory)) { |
||
39 | $this->loadViews($containerViewDirectory); |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 | |||
63 |
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: