public function processCnab(RetornoInterface $retorno, ComposableInterface $composable, LoteInterface $lote = null)
 {
     switch ((int) $composable->getRegistro()->__toString()) {
         case self::HEADER_ARQUIVO:
             $retorno->setHeader($composable);
             break;
         case self::TRAILER_ARQUIVO:
             $retorno->setTrailer($composable);
             break;
         default:
             $lote->addDetail($composable);
             break;
     }
 }
 public function processCnab(RetornoInterface $retorno, ComposableInterface $composable, LoteInterface $lote = null)
 {
     switch ((int) $composable->getRegistro()->__toString()) {
         case AbstractCNAB400Processor::HEADER_ARQUIVO:
             $retorno->setHeader($composable);
             break;
         case self::TRAILER_ARQUIVO:
             $retorno->setTrailer($composable);
             break;
         case self::HEADER_LOTE:
             if ($composable instanceof CnabHeaderInterface) {
                 $lote->setHeader($composable);
             } else {
                 $lote->addDetail($composable);
             }
             break;
         case self::TRAILER_LOTE:
             $lote->setTrailer($composable);
             break;
         default:
             $lote->addDetail($composable);
             break;
     }
 }