Skip to content

Commit

Permalink
[ECVS-9] removed unused.
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanim committed Dec 30, 2023
1 parent 38b51fd commit 187abc7
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/helpers/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace rocketfellows\ViesVatValidationRest\helpers;

use Psr\Http\Message\ResponseInterface;
use rocketfellows\ViesVatValidationInterface\VatNumber;
use rocketfellows\ViesVatValidationInterface\VatNumberValidationResult;
use stdClass;

class ResponseFactory
Expand All @@ -20,18 +18,4 @@ public static function getResponseData(ResponseInterface $response): stdClass

return ($responseData instanceof stdClass) ? $responseData : (object) [];
}

public static function getVatNumberValidationResult(stdClass $responseData): VatNumberValidationResult
{
return VatNumberValidationResult::create(
VatNumber::create(
$responseData->countryCode ?? '',
$responseData->vatNumber ?? '',
),
$responseData->requestDate ?? '',
$responseData->valid ?? false,
$responseData->name ?? null,
$responseData->address ?? null
);
}
}

0 comments on commit 187abc7

Please sign in to comment.