Code Duplication    Length = 33-34 lines in 2 locations

src/Auxiliar/Response.php 2 locations

@@ 63-96 (lines=34) @@
60
     * @param  DOMDocument $dom
61
     * @return boolean
62
     */
63
    protected static function zReadRecepcaoLote($dom)
64
    {
65
        //retorno da funçao
66
        $aResposta = array(
67
            'bStat' => false,
68
            'versao' => '',
69
            'tpAmb' => '',
70
            'cUF' => '',
71
            'cStat' => '',
72
            'verAplic' => '',
73
            'xMotivo' => '',
74
            'dhRecbto' => '',
75
            'tMed' => '',
76
            'nRec' => ''
77
        );
78
        $tag = $dom->getNode('retEnviMDFe');
79
        if (empty($tag)) {
80
            return $aResposta;
81
        }
82
        $infRec = $dom->getNode('infRec');
83
        $aResposta = array(
84
            'bStat' => true,
85
            'versao' => $tag->getAttribute('versao'),
86
            'tpAmb' => $dom->getValue($tag, 'tpAmb'),
87
            'cUF' => $dom->getValue($tag, 'cUF'),
88
            'cStat' => $dom->getValue($tag, 'cStat'),
89
            'verAplic' => $dom->getValue($tag, 'verAplic'),
90
            'xMotivo' => $dom->getValue($tag, 'xMotivo'),
91
            'dhRecbto' => $dom->getValue($infRec, 'dhRecbto'),
92
            'tMed' => $dom->getValue($infRec, 'tMed'),
93
            'nRec' => $dom->getValue($infRec, 'nRec')
94
        );
95
        return $aResposta;
96
    }
97
    
98
    /**
99
     * zReadRetRecepcao
@@ 187-219 (lines=33) @@
184
     * @param  DOMDocument $dom
185
     * @return string|boolean
186
     */
187
    protected static function zReadStatusServico($dom)
188
    {
189
        //retorno da funçao
190
        $aResposta = array(
191
            'bStat' => false,
192
            'versao' => '',
193
            'cStat' => '',
194
            'verAplic' => '',
195
            'xMotivo' => '',
196
            'dhRecbto' => '',
197
            'tMed' => '',
198
            'cUF' => '',
199
            'dhRetorno' => '',
200
            'xObs' => ''
201
        );
202
        $tag = $dom->getNode('retConsStatServMDFe');
203
        if (empty($tag)) {
204
            return $aResposta;
205
        }
206
        $aResposta = array(
207
            'bStat' => true,
208
            'versao' => $tag->getAttribute('versao'),
209
            'cStat' => $dom->getValue($tag, 'cStat'),
210
            'verAplic' => $dom->getValue($tag, 'verAplic'),
211
            'xMotivo' => $dom->getValue($tag, 'xMotivo'),
212
            'dhRecbto' => $dom->getValue($tag, 'dhRecbto'),
213
            'tMed' => $dom->getValue($tag, 'tMed'),
214
            'cUF' => $dom->getValue($tag, 'cUF'),
215
            'dhRetorno' => $dom->getValue($tag, 'dhRetorno'),
216
            'xObs' => $dom->getValue($tag, 'xObs')
217
        );
218
        return $aResposta;
219
    }
220
    
221
    /**
222
     * zReadRecepcaoEvento