Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function cabecalho() { |
||
31 | $this->txt .= " Winners OpenSource \n"; |
||
32 | $this->txt .= "--------------------------\n"; |
||
33 | $this->txt .= " " . $this->userName . "\n"; |
||
34 | $this->txt .= "--------------------------\n"; |
||
35 | |||
36 | $this->txt .= "Data: " . date('d') . '/' . date('m') . '/' . date('Y') |
||
37 | . "\nHora: " . date('H:i:s') . "\n"; |
||
38 | |||
39 | $this->txt .= "--------------------------\n\n"; |
||
40 | } |
||
41 | |||
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: