| Conditions | 1 |
| Paths | 1 |
| Total Lines | 41 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | protected function toNode250() |
||
| 11 | { |
||
| 12 | $ideEmpregador = $this->node->getElementsByTagName('ideEmpregador')->item(0); |
||
|
|
|||
| 13 | //o idEvento pode variar de evento para evento |
||
| 14 | //então cada factory individualmente terá de construir o seu |
||
| 15 | $ideEvento = $this->dom->createElement("ideEvento"); |
||
| 16 | $this->dom->addChild( |
||
| 17 | $ideEvento, |
||
| 18 | "indApuracao", |
||
| 19 | $this->std->indapuracao, |
||
| 20 | true |
||
| 21 | ); |
||
| 22 | $this->dom->addChild( |
||
| 23 | $ideEvento, |
||
| 24 | "perApur", |
||
| 25 | $this->std->perapur, |
||
| 26 | true |
||
| 27 | ); |
||
| 28 | $this->dom->addChild( |
||
| 29 | $ideEvento, |
||
| 30 | "tpAmb", |
||
| 31 | $this->tpAmb, |
||
| 32 | true |
||
| 33 | ); |
||
| 34 | $this->dom->addChild( |
||
| 35 | $ideEvento, |
||
| 36 | "procEmi", |
||
| 37 | $this->procEmi, |
||
| 38 | true |
||
| 39 | ); |
||
| 40 | $this->dom->addChild( |
||
| 41 | $ideEvento, |
||
| 42 | "verProc", |
||
| 43 | $this->verProc, |
||
| 44 | true |
||
| 45 | ); |
||
| 46 | $this->node->insertBefore($ideEvento, $ideEmpregador); |
||
| 47 | $this->eSocial->appendChild($this->node); |
||
| 48 | //$this->xml = $this->dom->saveXML($this->eSocial); |
||
| 49 | $this->sign(); |
||
| 50 | } |
||
| 51 | |||
| 60 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: