1 | <?php |
||
13 | class J210 extends Element implements ElementInterface |
||
14 | { |
||
15 | const REG = 'J210'; |
||
16 | const LEVEL = 3; |
||
17 | const PARENT = ''; |
||
18 | |||
19 | protected $parameters = [ |
||
20 | 'ind_tip' => [ |
||
21 | 'type' => 'numeric', |
||
22 | 'regex' => '^[0-1]{1}$', |
||
23 | 'required' => true, |
||
24 | 'info' => 'Indicador do tipo de demonstração:' |
||
25 | .' 0 – DLPA – Demonstração de Lucro ou Prejuízos Acumulados' |
||
26 | .' 1 – DMPL – Demonstração de Mutações do Patrimônio Líquido', |
||
27 | 'format' => '' |
||
28 | ], |
||
29 | 'cod_agl' => [ |
||
30 | 'type' => 'string', |
||
31 | 'regex' => '^[A-Za-z0-9]$', |
||
32 | 'required' => true, |
||
33 | 'info' => 'Código de aglutinação atribuído pela pessoa jurídica.', |
||
34 | 'format' => '' |
||
35 | ], |
||
36 | 'descr_cod_agl' => [ |
||
37 | 'type' => 'string', |
||
38 | 'regex' => '^[A-Za-z0-9]$', |
||
39 | 'required' => true, |
||
40 | 'info' => 'Descrição do código de aglutinação.', |
||
41 | 'format' => '' |
||
42 | ], |
||
43 | 'vl_cta_ini' => [ |
||
44 | 'type' => 'numeric', |
||
45 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
46 | 'required' => true, |
||
47 | 'info' => 'Valor inicial do código de aglutinação no Balanço Patrimonial no exercício ' |
||
48 | . 'informado, ou de período definido em norma específica.', |
||
49 | 'format' => '19v2' |
||
50 | ], |
||
51 | 'ind_dc_cta_ini' => [ |
||
52 | 'type' => 'string', |
||
53 | 'regex' => '^(D|C)$', |
||
54 | 'required' => true, |
||
55 | 'info' => 'Indicador da situação do saldo inicial informado no campo anterior: ' |
||
56 | . 'D - Devedor; C – Credor.', |
||
57 | 'format' => '' |
||
58 | ], |
||
59 | 'vl_cta_fin' => [ |
||
60 | 'type' => 'numeric', |
||
61 | 'regex' => '^\d+(\.\d*)?|\.\d+$', |
||
62 | 'required' => true, |
||
63 | 'info' => 'Valor final do código de aglutinação no Balanço Patrimonial no exercício informado, ' |
||
64 | . 'ou de período definido em norma específica.', |
||
65 | 'format' => '19v2' |
||
66 | ], |
||
67 | 'ind_dc_cta_fin' => [ |
||
68 | 'type' => 'string', |
||
69 | 'regex' => '^(D|C)$', |
||
70 | 'required' => true, |
||
71 | 'info' => 'Indicador da situação do saldo final informado no campo anterior: D - Devedor; C – Credor.', |
||
72 | 'format' => '' |
||
73 | ], |
||
74 | 'nota_exp_ref' => [ |
||
75 | 'type' => 'string', |
||
76 | 'regex' => '^[A-Za-z0-9]{12}$', |
||
77 | 'required' => false, |
||
78 | 'info' => 'Referência a numeração das notas explicativas relativas às demonstrações contábeis.', |
||
79 | 'format' => '' |
||
80 | ] |
||
81 | ]; |
||
82 | |||
83 | /** |
||
84 | * Constructor |
||
85 | * @param \stdClass $std |
||
86 | */ |
||
87 | public function __construct(\stdClass $std) |
||
93 | } |
||
94 |
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: