Skip to content

Commit

Permalink
Merge pull request #6 from dmt-software/1.3
Browse files Browse the repository at this point in the history
dependency cleanup and update
  • Loading branch information
proggeler committed Nov 24, 2020
2 parents 4a0ad61 + 227d8ef commit f54b417
Show file tree
Hide file tree
Showing 9 changed files with 656 additions and 1,198 deletions.
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"php": "^7.2",
"dmt-software/jms-soap-serializer": "^2.1",
"dmt-software/command-bus-validator": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"doctrine/annotations": "^1.6",
"doctrine/cache": "^1.8"
"guzzlehttp/guzzle": "^6.3"
},
"autoload": {
"psr-4": {
Expand Down
1,811 changes: 641 additions & 1,170 deletions composer.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/ClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use DMT\Soap\Serializer\SoapMessageEventSubscriber;
use DMT\Soap\Serializer\SoapSerializationVisitorFactory;
use DMT\VatServiceEu\Handler\CheckVatHandler;
use Doctrine\Common\Annotations\AnnotationRegistry;
use JMS\Serializer\EventDispatcher\EventDispatcher;
use JMS\Serializer\Handler\HandlerRegistry;
use JMS\Serializer\Naming\IdenticalPropertyNamingStrategy;
Expand Down Expand Up @@ -37,7 +36,6 @@ public static function create(): ClientBuilder
* Build the client.
*
* @return Client
* @throws \Doctrine\Common\Annotations\AnnotationException
*/
public function build(): Client
{
Expand Down Expand Up @@ -71,8 +69,6 @@ public function getCheckVatHandler(): CheckVatHandler
*/
public function getSerializer(): SerializerInterface
{
AnnotationRegistry::registerUniqueLoader('class_exists');

return
SerializerBuilder::create()
->setSerializationVisitor('soap', new SoapSerializationVisitorFactory())
Expand Down
3 changes: 2 additions & 1 deletion src/Handler/CheckVatHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class CheckVatHandler
protected $serializer;

/**
* CheckVatHander constructor.
* CheckVatHandler constructor.
*
* @param Client $httpClient
* @param SerializerInterface $serializer
*/
Expand Down
11 changes: 6 additions & 5 deletions src/Response/CheckVatApproxResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DMT\VatServiceEu\Response;

use DateTime;
use JMS\Serializer\Annotation as JMS;

/**
Expand Down Expand Up @@ -33,7 +34,7 @@ class CheckVatApproxResponse implements ResponseInterface
* @JMS\Type("DateTime<'Y-m-dP'>")
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types")
*
* @var \DateTime
* @var DateTime
*/
protected $requestDate;

Expand Down Expand Up @@ -174,17 +175,17 @@ public function setVatNumber(string $vatNumber): void
}

/**
* @return \DateTime
* @return DateTime
*/
public function getRequestDate(): ?\DateTime
public function getRequestDate(): ?DateTime
{
return $this->requestDate;
}

/**
* @param \DateTime $requestDate
* @param DateTime $requestDate
*/
public function setRequestDate(\DateTime $requestDate): void
public function setRequestDate(DateTime $requestDate): void
{
$this->requestDate = $requestDate;
}
Expand Down
11 changes: 6 additions & 5 deletions src/Response/CheckVatResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DMT\VatServiceEu\Response;

use DateTime;
use JMS\Serializer\Annotation as JMS;

/**
Expand Down Expand Up @@ -33,7 +34,7 @@ class CheckVatResponse implements ResponseInterface
* @JMS\Type("DateTime<'Y-m-dP'>")
* @JMS\XmlElement(cdata=false)
*
* @var \DateTime
* @var DateTime
*/
protected $requestDate;

Expand Down Expand Up @@ -94,17 +95,17 @@ public function setVatNumber(string $vatNumber): void
}

/**
* @return \DateTime
* @return DateTime
*/
public function getRequestDate(): ?\DateTime
public function getRequestDate(): ?DateTime
{
return $this->requestDate;
}

/**
* @param \DateTime $requestDate
* @param DateTime $requestDate
*/
public function setRequestDate(\DateTime $requestDate): void
public function setRequestDate(DateTime $requestDate): void
{
$this->requestDate = $requestDate;
}
Expand Down
3 changes: 0 additions & 3 deletions tests/ClientBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

class ClientBuilderTest extends TestCase
{
/**
* @throws \Doctrine\Common\Annotations\AnnotationException
*/
public function testBuildClient()
{
$this->assertInstanceOf(Client::class, ClientBuilder::create()->build());
Expand Down
4 changes: 0 additions & 4 deletions tests/Request/CheckVatApproxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use DMT\CommandBus\Validator\ValidationException;
use DMT\CommandBus\Validator\ValidationMiddleware;
use DMT\VatServiceEu\Request\CheckVatApprox;
use Doctrine\Common\Annotations\AnnotationRegistry;
use JMS\Serializer\Naming\IdenticalPropertyNamingStrategy;
use JMS\Serializer\SerializerBuilder;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -42,7 +41,6 @@ public function testPropertyAccessors()
*
* @param CheckVatApprox $checkVat
* @param string $message
* @throws \Doctrine\Common\Annotations\AnnotationException
*/
public function testValidation(CheckVatApprox $checkVat, string $message)
{
Expand All @@ -66,8 +64,6 @@ function (ConstraintViolation $violation) {
*/
public function provideViolation()
{
AnnotationRegistry::registerUniqueLoader('class_exists');

$serializer = SerializerBuilder::create()
->setPropertyNamingStrategy(new IdenticalPropertyNamingStrategy())
->build();
Expand Down
3 changes: 0 additions & 3 deletions tests/Request/CheckVatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function testPropertyAccessors()
*
* @param CheckVat $checkVat
* @param string $message
* @throws \Doctrine\Common\Annotations\AnnotationException
*/
public function testValidation(CheckVat $checkVat, string $message)
{
Expand All @@ -52,8 +51,6 @@ function (ConstraintViolation $violation) {
*/
public function provideViolation()
{
AnnotationRegistry::registerUniqueLoader('class_exists');

$serializer = SerializerBuilder::create()
->setPropertyNamingStrategy(new IdenticalPropertyNamingStrategy())
->build();
Expand Down

0 comments on commit f54b417

Please sign in to comment.