1 | <?php |
||
15 | class J932 extends Element implements ElementInterface |
||
16 | { |
||
17 | const REG = 'J932'; |
||
18 | const LEVEL = 3; |
||
19 | const PARENT = ''; |
||
20 | |||
21 | protected $parameters = [ |
||
22 | 'ident_nom_t' => [ |
||
23 | 'type' => 'string', |
||
24 | 'regex' => '^[A-Za-z]$', |
||
25 | 'required' => true, |
||
26 | 'info' => 'Nome do signatário.', |
||
27 | 'format' => '' |
||
28 | ], |
||
29 | 'ident_cpf_cnpj_t' => [ |
||
30 | 'type' => 'numeric', |
||
31 | 'regex' => '^[0-9]$', |
||
32 | 'required' => true, |
||
33 | 'info' => 'CPF ou CNPJ', |
||
34 | 'format' => '' |
||
35 | ], |
||
36 | 'ident_qualif_t' => [ |
||
37 | 'type' => 'string', |
||
38 | 'regex' => '^[A-Za-z0-9]$', |
||
39 | 'required' => true, |
||
40 | 'info' => 'Qualificação do assinante, conforme tabela.', |
||
41 | 'format' => '' |
||
42 | ], |
||
43 | 'cod_assin_t' => [ |
||
44 | 'type' => 'string', |
||
45 | 'regex' => '^[A-Za-z0-9]{3}$', |
||
46 | 'required' => true, |
||
47 | 'info' => 'Código de qualificação do assinante, conforme tabela.', |
||
48 | 'format' => '' |
||
49 | ], |
||
50 | 'ind_crc_t' => [ |
||
51 | 'type' => 'string', |
||
52 | 'regex' => '^[A-Za-z0-9]$', |
||
53 | 'required' => false, |
||
54 | 'info' => 'Número de inscrição do contabilista no Conselho Regional de Contabilidade.', |
||
55 | 'format' => '' |
||
56 | ], |
||
57 | 'email_t' => [ |
||
58 | 'type' => 'string', |
||
59 | 'regex' => '^[A-Za-z0-9]{60}$', |
||
60 | 'required' => false, |
||
61 | 'info' => 'Email do signatário.', |
||
62 | 'format' => '' |
||
63 | ], |
||
64 | 'fone_t' => [ |
||
65 | 'type' => 'string', |
||
66 | 'regex' => '^[0-9]{14}$', |
||
67 | 'required' => false, |
||
68 | 'info' => 'Telefone do signatário.', |
||
69 | 'format' => '' |
||
70 | ], |
||
71 | 'uf_crc_t' => [ |
||
72 | 'type' => 'string', |
||
73 | 'regex' => '^[A-Z]{2}$', |
||
74 | 'required' => false, |
||
75 | 'info' => 'Indicação da unidade da federação que expediu o CRC.', |
||
76 | 'format' => '' |
||
77 | ], |
||
78 | 'num_seq_crc_t' => [ |
||
79 | 'type' => 'string', |
||
80 | 'regex' => '^[0-9]$', |
||
81 | 'required' => false, |
||
82 | 'info' => 'Número da Certidão de Regularidade Profissional do Contador no ' |
||
83 | . 'seguinte formato: UF/ano/número', |
||
84 | 'format' => '' |
||
85 | ], |
||
86 | 'dt_crc_t' => [ |
||
87 | 'type' => 'string', |
||
88 | 'regex' => '^(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})$', |
||
89 | 'required' => false, |
||
90 | 'info' => 'Data de validade da Certidão de Regularidade Profissional do Contador.', |
||
91 | 'format' => '' |
||
92 | ] |
||
93 | ]; |
||
94 | |||
95 | /** |
||
96 | * Constructor |
||
97 | * @param \stdClass $std |
||
98 | */ |
||
99 | public function __construct(\stdClass $std) |
||
105 | } |
||
106 |
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: