1 | <?php |
||
13 | class I155 extends Element implements ElementInterface |
||
14 | { |
||
15 | const REG = 'I155'; |
||
16 | const LEVEL = 4; |
||
17 | const PARENT = 'I150'; |
||
18 | |||
19 | protected $parameters = [ |
||
20 | 'cod_cta' => [ |
||
21 | 'type' => 'string', |
||
22 | 'regex' => '^.*$', |
||
23 | 'required' => true, |
||
24 | 'info' => 'Código da conta analitica', |
||
25 | 'format' => '' |
||
26 | ], |
||
27 | 'cod_ccus' => [ |
||
28 | 'type' => 'string', |
||
29 | 'regex' => '^[A-Za-z0-9]$', |
||
30 | 'required' => false, |
||
31 | 'info' => 'Código do Centro de Custos', |
||
32 | 'format' => '' |
||
33 | ], |
||
34 | 'vl_sld_ini' => [ |
||
35 | 'type' => 'numeric', |
||
36 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
37 | 'required' => true, |
||
38 | 'info' => 'Valor do saldo inicial do período.', |
||
39 | 'format' => '19v2' |
||
40 | ], |
||
41 | 'ind_dc_ini' => [ |
||
42 | 'type' => 'string', |
||
43 | 'regex' => '^(D|C)$', |
||
44 | 'required' => false, |
||
45 | 'info' => 'Indicador da situacao do saldo inicial: D-Devedor; C-Credor', |
||
46 | 'format' => '' |
||
47 | ], |
||
48 | 'vl_deb' => [ |
||
49 | 'type' => 'numeric', |
||
50 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
51 | 'required' => true, |
||
52 | 'info' => 'Valor total dos debitos no periodo', |
||
53 | 'format' => '19v2' |
||
54 | ], |
||
55 | 'vl_cred' => [ |
||
56 | 'type' => 'numeric', |
||
57 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
58 | 'required' => true, |
||
59 | 'info' => 'Valor total dos creditos no periodo', |
||
60 | 'format' => '19v2' |
||
61 | ], |
||
62 | 'vl_sld_fin' => [ |
||
63 | 'type' => 'numeric', |
||
64 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
65 | 'required' => true, |
||
66 | 'info' => 'Valor total dos creditos no periodo', |
||
67 | 'format' => '19v2' |
||
68 | ], |
||
69 | 'ind_dc_fin' => [ |
||
70 | 'type' => 'string', |
||
71 | 'regex' => '^(D|C)$', |
||
72 | 'required' => false, |
||
73 | 'info' => 'Indicador da situacao do saldo final: D-Devedor; C-Credor', |
||
74 | 'format' => '' |
||
75 | ] |
||
76 | ]; |
||
77 | |||
78 | /** |
||
79 | * Constructor |
||
80 | * @param \stdClass $std |
||
81 | */ |
||
82 | public function __construct(\stdClass $std) |
||
88 | } |
||
89 |
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: