Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Remove spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Apr 16, 2021
1 parent 683d3de commit 28aecbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Peru/Sunat/RucParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private function getFirstLine(string $text): string
{
$lines = explode("\r\n", $text);

return $lines[0];
return trim($lines[0]);
}

private function fixEstado(Company $company): void
Expand All @@ -124,11 +124,11 @@ private function fixEstado(Company $company): void
if ($count === 1) {
return;
}
$company->estado = $lines[0];

$validLines = iterator_to_array($this->filterValidLines($lines));
$updateFechaBaja = count($validLines) === 3 && $company->fechaBaja === null;

$company->estado = $validLines[0];
$company->fechaBaja = $updateFechaBaja ? $this->parseDate($validLines[2]): $company->fechaBaja;
}

Expand Down

0 comments on commit 28aecbb

Please sign in to comment.