| 1 | <?php |
||
| 13 | class I075 extends Element implements ElementInterface |
||
| 14 | { |
||
| 15 | const REG = 'I075'; |
||
| 16 | const LEVEL = 3; |
||
| 17 | const PARENT = ''; |
||
| 18 | |||
| 19 | protected $parameters = [ |
||
| 20 | 'cod_hist' => [ |
||
| 21 | 'type' => 'string', |
||
| 22 | 'regex' => '^([0-9])*$', |
||
| 23 | 'required' => true, |
||
| 24 | 'info' => 'Codigo do historico padronizado.', |
||
| 25 | 'format' => '' |
||
| 26 | ], |
||
| 27 | 'descr_hist' => [ |
||
| 28 | 'type' => 'string', |
||
| 29 | 'regex' => '^.*$', |
||
| 30 | 'required' => true, |
||
| 31 | 'info' => 'Descricao do historico padronizado', |
||
| 32 | 'format' => '' |
||
| 33 | ] |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor |
||
| 38 | * @param \stdClass $std |
||
| 39 | */ |
||
| 40 | public function __construct(\stdClass $std) |
||
| 46 | } |
||
| 47 |
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: