From 9e41702c05f7a4b2664fba9fb097f613838767a9 Mon Sep 17 00:00:00 2001 From: "celine.c" Date: Wed, 4 Oct 2023 11:50:30 +0200 Subject: [PATCH] fix: types errors --- Model/Document.php | 2 +- Model/Signer.php | 2 +- Model/TransactionInfo.php | 2 +- Requester/RegistrationAuthority.php | 1 - Requester/Signer.php | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Model/Document.php b/Model/Document.php index 62fc279..f69efaf 100644 --- a/Model/Document.php +++ b/Model/Document.php @@ -44,7 +44,7 @@ public function __construct() $this->content = null; $this->url = null; $this->fileName = null; - $this->signatureFields = null; + $this->signatureFields = []; $this->checkBoxTexts = null; $this->metaData = null; $this->title = null; diff --git a/Model/Signer.php b/Model/Signer.php index 4ef60bc..6b87aaf 100644 --- a/Model/Signer.php +++ b/Model/Signer.php @@ -105,7 +105,7 @@ public static function configureData(OptionsResolver $resolver): void return RegistrationRequest::createFromArray($value); }) ->setDefault('validationSessionId', null)->setAllowedTypes('validationSessionId', ['null', 'string']) - ->setDefault('redirectPolicy', null)->setAllowedValues('redirectPolicy', ['null', 'dashboard', 'quick']) + ->setDefault('redirectPolicy', null)->setAllowedValues('redirectPolicy', [null, 'dashboard', 'quick']) ->setDefault('redirectWait', 5)->setAllowedTypes('redirectWait', ['int'])->setNormalizer('redirectWait', function (Options $options, $value) { if ('quick' === $options['redirectPolicy']) { return null; diff --git a/Model/TransactionInfo.php b/Model/TransactionInfo.php index 61ec3cc..96b79c8 100644 --- a/Model/TransactionInfo.php +++ b/Model/TransactionInfo.php @@ -32,7 +32,7 @@ class TransactionInfo protected ?string $description; - protected InitiatorInfo $initiatorInfo; + protected ?InitiatorInfo $initiatorInfo; protected ?bool $eachField; diff --git a/Requester/RegistrationAuthority.php b/Requester/RegistrationAuthority.php index a15b7fa..8a0efe2 100644 --- a/Requester/RegistrationAuthority.php +++ b/Requester/RegistrationAuthority.php @@ -6,7 +6,6 @@ use Mpp\UniversignBundle\Model\MatchingResult; use Mpp\UniversignBundle\Model\ValidationRequest; use Mpp\UniversignBundle\Model\ValidatorResult; -use PhpXmlRpc\Encoder; use PhpXmlRpc\Exception; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Routing\Router; diff --git a/Requester/Signer.php b/Requester/Signer.php index bfb3e55..ea29357 100644 --- a/Requester/Signer.php +++ b/Requester/Signer.php @@ -10,7 +10,6 @@ use Mpp\UniversignBundle\Model\TransactionRequest; use Mpp\UniversignBundle\Model\TransactionResponse; use Mpp\UniversignBundle\Model\XmlRpc\Base64; -use PhpXmlRpc\Encoder; use PhpXmlRpc\Exception; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Routing\Router;