From 224b496c4b5857962596ef15d49275d1065e1a59 Mon Sep 17 00:00:00 2001 From: Adam Nagy Date: Mon, 13 Jan 2025 13:06:27 +0100 Subject: [PATCH 01/14] EWPP-4991: Ensure PHP8.3 compatibility. --- .github/workflows/ci.yml | 44 ++++++++++++++----- composer.json | 14 ++---- docker-compose.yml | 3 +- .../Assembler/AbstractAssemblerTest.php | 5 ++- .../Assembler/ArrayPropertyAssemblerTest.php | 2 +- .../Assembler/ArraySetterAssemblerTest.php | 2 +- .../NullablePropertyAssemblerTest.php | 2 +- 7 files changed, 42 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f58e9f56..6b4803f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,34 +1,54 @@ name: ci on: [push, pull_request] + jobs: automated-tests: runs-on: ubuntu-latest strategy: matrix: - php_version: ["8.1", "8.2"] - composer_command: ["composer install", "composer update --prefer-lowest"] + php_version: ["8.1", "8.3"] + composer_command: ["composer install"] env: PHP_VERSION: ${{ matrix.php_version }} steps: - - name: clone + - name: Clone repository uses: actions/checkout@v2 - - run: docker-compose up -d - - name: build + + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose + + - name: Start services with Docker Compose + run: docker-compose up -d + + - name: Build dependencies run: docker-compose exec -T php ${{ matrix.composer_command }} - - name: test + + - name: Run tests run: docker-compose exec -T php ./vendor/bin/phpunit + code-sniffer: runs-on: ubuntu-latest strategy: matrix: - php_version: ["8.1", "8.2"] + php_version: ["8.1", "8.3"] env: PHP_VERSION: ${{ matrix.php_version }} steps: - - name: clone + - name: Clone repository uses: actions/checkout@v2 - - run: docker-compose up -d - - name: build + + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose + + - name: Start services with Docker Compose + run: docker-compose up -d + + - name: Install dependencies run: docker-compose exec -T php composer install - - name: test - run: docker-compose exec -T php ./vendor/bin/grumphp run + + - name: Run code sniffer + run: docker-compose exec -T php ./vendor/bin/grumphp run \ No newline at end of file diff --git a/composer.json b/composer.json index 2a484c4b..307effc1 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "cweagans/composer-patches": "^1 || ^2", "php-http/logger-plugin": "^1", "php-http/message": "~1.13", - "phpro/soap-client": "~2.4", + "phpro/soap-client": "~3.4", "psr/http-client": "^1", "psr/http-client-implementation": "*", "psr/http-factory": "^1", @@ -21,7 +21,7 @@ "symfony/http-client": "~5.4 || ~6", "symfony/serializer": "~5.4 || ~6", "symfony/validator": "~5.4 || ~6", - "veewee/xml": "^2.0" + "veewee/xml": "^3.0" }, "require-dev": { "colinodell/psr-testlogger": "^1.1", @@ -69,13 +69,5 @@ }, "bin": ["bin/epoetry"], "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "patches": { - "phpro/soap-client" : { - "https://github.com/phpro/soap-client/issues/446": "https://patch-diff.githubusercontent.com/raw/phpro/soap-client/pull/448.diff", - "https://github.com/phpro/soap-client/issues/444": "https://patch-diff.githubusercontent.com/raw/phpro/soap-client/pull/445.diff" - } - } - } + "prefer-stable": true } diff --git a/docker-compose.yml b/docker-compose.yml index 2af92289..ebfc6164 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: "2" services: php: - image: wodby/php:8.1 + image: wodby/php:8.3 environment: # PHP_XDEBUG: 1 # Uncomment to enable XDebug. PHP_FPM_USER: wodby diff --git a/tests/CodeGenerator/Assembler/AbstractAssemblerTest.php b/tests/CodeGenerator/Assembler/AbstractAssemblerTest.php index a2a82095..001aa509 100644 --- a/tests/CodeGenerator/Assembler/AbstractAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/AbstractAssemblerTest.php @@ -11,6 +11,7 @@ use Phpro\SoapClient\CodeGenerator\Model\Type; use PHPUnit\Framework\TestCase; use Laminas\Code\Generator\ClassGenerator; +use Soap\Engine\Metadata\Model\TypeMeta; abstract class AbstractAssemblerTest extends TestCase { @@ -47,8 +48,8 @@ protected function createContext($propertyName = 'prop1') ]; $class = new ClassGenerator('MyType', 'MyNamespace'); - $type = new Type('MyNamespace', 'MyType', $properties); - $property = new Property($propertyName, $properties[$propertyName], 'ns1'); + $type = new Type('MyNamespace', 'MyType', $properties, new TypeMeta()); + $property = new Property($propertyName, $properties[$propertyName], 'ns1', new TypeMeta()); return new PropertyContext($class, $type, $property); } diff --git a/tests/CodeGenerator/Assembler/ArrayPropertyAssemblerTest.php b/tests/CodeGenerator/Assembler/ArrayPropertyAssemblerTest.php index c8a5be66..05263f6a 100644 --- a/tests/CodeGenerator/Assembler/ArrayPropertyAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/ArrayPropertyAssemblerTest.php @@ -45,7 +45,7 @@ class MyType /** * @var string[]|array */ - private $prop1 = []; + private string $prop1 = []; } CODE; diff --git a/tests/CodeGenerator/Assembler/ArraySetterAssemblerTest.php b/tests/CodeGenerator/Assembler/ArraySetterAssemblerTest.php index eba54c05..64d8c7bc 100644 --- a/tests/CodeGenerator/Assembler/ArraySetterAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/ArraySetterAssemblerTest.php @@ -50,7 +50,7 @@ class MyType /** * @param string[] $prop1 */ - public function setProp1(array $prop1) + public function setProp1(array $prop1) : void { $this->prop1 = $prop1; } diff --git a/tests/CodeGenerator/Assembler/NullablePropertyAssemblerTest.php b/tests/CodeGenerator/Assembler/NullablePropertyAssemblerTest.php index 7ab6bc36..aaf62d2c 100644 --- a/tests/CodeGenerator/Assembler/NullablePropertyAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/NullablePropertyAssemblerTest.php @@ -55,7 +55,7 @@ class MyType /** * @var null|string */ - private $prop1; + private string $prop1; } CODE; From 46cd17a8ae1b1b28f05ab1b8fff7be8bc09bb994 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Tue, 21 Jan 2025 09:44:50 +0100 Subject: [PATCH 02/14] EWPP-4991: Add NullableGetterAssembler and re-run code generation. --- .../ClientCertificateClient.php | 11 +- .../Type/GetServiceTicket.php | 19 +-- .../Type/GetServiceTicketResponse.php | 9 +- .../Assembler/NullableGetterAssembler.php | 108 +++++++++++++ .../NullableGetterAssemblerOptions.php | 142 ++++++++++++++++++ src/CodeGenerator/ConfigProcessor.php | 9 +- src/Notification/Type/DgtNotification.php | 20 +-- .../Type/DgtNotificationResult.php | 4 +- src/Notification/Type/LinguisticRequest.php | 12 +- src/Notification/Type/Product.php | 36 ++--- src/Notification/Type/ProductReference.php | 4 +- src/Notification/Type/ReceiveNotification.php | 2 +- .../Type/ReceiveNotificationResponse.php | 2 +- src/Notification/Type/RequestReference.php | 33 +--- src/Request/RequestClient.php | 88 ++++++++--- src/Request/Type/AddNewPartToDossier.php | 8 +- .../Type/AddNewPartToDossierResponse.php | 2 +- src/Request/Type/AuxiliaryDocumentOut.php | 34 ++--- src/Request/Type/AuxiliaryDocuments.php | 2 +- src/Request/Type/AuxiliaryDocumentsIn.php | 10 +- src/Request/Type/ContactPersonIn.php | 18 +-- src/Request/Type/ContactPersonOut.php | 30 ++-- src/Request/Type/Contacts.php | 2 +- src/Request/Type/CorrectionDetailsIn.php | 36 ++--- src/Request/Type/CorrectionReferenceIn.php | 2 +- src/Request/Type/CorrectionRequestOut.php | 4 +- src/Request/Type/CreateCorrectionRequest.php | 4 +- .../Type/CreateCorrectionRequestResponse.php | 2 +- src/Request/Type/CreateLinguisticRequest.php | 6 +- .../Type/CreateLinguisticRequestResponse.php | 2 +- src/Request/Type/CreateNewVersion.php | 4 +- src/Request/Type/CreateNewVersionResponse.php | 2 +- src/Request/Type/DcoOut.php | 38 ++--- src/Request/Type/DocumentIn.php | 24 +-- src/Request/Type/DossierReference.php | 6 +- src/Request/Type/GetLinguisticRequest.php | 4 +- .../Type/GetLinguisticRequestResponse.php | 2 +- src/Request/Type/InformativeMessages.php | 2 +- src/Request/Type/LinguisticRequestIn.php | 4 +- src/Request/Type/LinguisticRequestOut.php | 6 +- src/Request/Type/LinguisticSectionIn.php | 14 +- src/Request/Type/LinguisticSectionOut.php | 14 +- src/Request/Type/LinguisticSections.php | 2 +- .../Type/ModifyAuxiliaryDocumentsIn.php | 8 +- src/Request/Type/ModifyLinguisticRequest.php | 4 +- .../Type/ModifyLinguisticRequestIn.php | 4 +- .../Type/ModifyLinguisticRequestResponse.php | 2 +- src/Request/Type/ModifyProductRequestIn.php | 14 +- src/Request/Type/ModifyRequestDetailsIn.php | 6 +- src/Request/Type/ModifyRequestReferenceIn.php | 6 +- src/Request/Type/NoSuchMethodException.php | 2 +- src/Request/Type/OriginalDocumentIn.php | 18 +-- src/Request/Type/OriginalDocumentOut.php | 20 +-- src/Request/Type/ProductRequestIn.php | 14 +- src/Request/Type/ProductRequestOut.php | 36 ++--- src/Request/Type/Products.php | 2 +- src/Request/Type/PrtDocuments.php | 2 +- src/Request/Type/ReferenceDocuments.php | 2 +- src/Request/Type/RequestDetailsIn.php | 84 +++++------ src/Request/Type/RequestDetailsOut.php | 100 ++++++------ src/Request/Type/RequestReferenceIn.php | 6 +- src/Request/Type/RequestReferenceOut.php | 16 +- src/Request/Type/ResubmitRequest.php | 6 +- src/Request/Type/ResubmitRequestResponse.php | 2 +- src/Request/Type/SrcDocumentIn.php | 14 +- src/Request/Type/TraxDocuments.php | 2 +- .../Type/UnsupportedEncodingException.php | 2 +- src/Request/Type/UpdateCallbackUrl.php | 4 +- src/Request/Type/UpdateCallbackUrlOut.php | 10 +- .../Type/UpdateCallbackUrlResponse.php | 2 +- .../Assembler/ArrayGetterAssemblerTest.php | 4 +- 71 files changed, 728 insertions(+), 447 deletions(-) create mode 100644 src/CodeGenerator/Assembler/NullableGetterAssembler.php create mode 100644 src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php diff --git a/src/Authentication/ClientCertificate/ClientCertificateClient.php b/src/Authentication/ClientCertificate/ClientCertificateClient.php index c7155823..d62061a2 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClient.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClient.php @@ -21,12 +21,17 @@ public function __construct(\Phpro\SoapClient\Caller\Caller $caller) } /** - * @param RequestInterface|Type\GetServiceTicket $getServiceTicketPart - * @return ResultInterface|Type\GetServiceTicketResponse + * @param RequestInterface & Type\GetServiceTicket $getServiceTicketPart + * @return ResultInterface & Type\GetServiceTicketResponse * @throws SoapException */ public function getServiceTicket(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicket $getServiceTicketPart) : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse { - return ($this->caller)('getServiceTicket', $getServiceTicketPart); + $response = ($this->caller)('getServiceTicket', $getServiceTicketPart); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } } diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php index 3d727ddd..69118be9 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php @@ -7,33 +7,33 @@ class GetServiceTicket implements RequestInterface { /** - * @var string + * @var \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI */ - private $service; + private \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service; /** * Constructor * - * @var string $service + * @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service */ - public function __construct($service) + public function __construct(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service) { $this->service = $service; } /** - * @return string + * @return \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI */ - public function getService() + public function getService() : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI { return $this->service; } /** - * @param string $service - * @return GetServiceTicket + * @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service + * @return static */ - public function withService($service) + public function withService(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service) : static { $new = clone $this; $new->service = $service; @@ -41,3 +41,4 @@ public function withService($service) return $new; } } + diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php index e711cc34..f2ba019d 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php @@ -9,21 +9,21 @@ class GetServiceTicketResponse implements ResultInterface /** * @var string */ - private $serviceTicket; + private string $serviceTicket; /** * @return string */ - public function getServiceTicket() + public function getServiceTicket() : string { return $this->serviceTicket; } /** * @param string $serviceTicket - * @return GetServiceTicketResponse + * @return static */ - public function withServiceTicket($serviceTicket) + public function withServiceTicket(string $serviceTicket) : static { $new = clone $this; $new->serviceTicket = $serviceTicket; @@ -31,3 +31,4 @@ public function withServiceTicket($serviceTicket) return $new; } } + diff --git a/src/CodeGenerator/Assembler/NullableGetterAssembler.php b/src/CodeGenerator/Assembler/NullableGetterAssembler.php new file mode 100644 index 00000000..063efa1a --- /dev/null +++ b/src/CodeGenerator/Assembler/NullableGetterAssembler.php @@ -0,0 +1,108 @@ +options = $options ?? new NullableGetterAssemblerOptions(); + } + + /** + * {@inheritdoc} + */ + public function canAssemble(ContextInterface $context): bool + { + return $context instanceof PropertyContext; + } + + /** + * @param ContextInterface|PropertyContext $context + * + * @throws AssemblerException + */ + public function assemble(ContextInterface $context) + { + $class = $context->getClass(); + $property = $context->getProperty(); + + // Property might be forced to be nullable by the code generator. + if ($this->options->useOptionalValue()) { + $property = $property->withMeta(fn(TypeMeta $meta): TypeMeta => $meta->withIsNullable(true)); + } + + try { + $prefix = $this->getPrefix($property); + $methodName = Normalizer::generatePropertyMethod($prefix, $property->getName()); + $class->removeMethod($methodName); + + $methodGenerator = new MethodGenerator($methodName); + $methodGenerator->setVisibility(MethodGenerator::VISIBILITY_PUBLIC); + $methodGenerator->setBody(sprintf('return $this->%s;', $property->getName())); + + if ($this->options->useReturnType()) { + $returnType = $this->options->useReturnNull() ? '?' . $property->getPhpType() : $property->getPhpType(); + $methodGenerator->setReturnType($returnType); + } + + if ($this->options->useDocBlocks()) { + $propertyType = $this->options->useReturnNull() ? $property->getType() . '|null' : $property->getType(); + $methodGenerator->setDocBlock(DocBlockGeneratorFactory::fromArray([ + 'tags' => [ + [ + 'name' => 'return', + 'description' => $propertyType, + ], + ], + ])); + } + + $class->addMethodFromGenerator($methodGenerator); + } catch (\Exception $e) { + throw AssemblerException::fromException($e); + } + } + + /** + * @param Property $property + * @return non-empty-string + */ + public function getPrefix(Property $property): string + { + if (!$this->options->useBoolGetters()) { + return 'get'; + } + + return $property->getType() === 'bool' ? 'is' : 'get'; + } +} diff --git a/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php b/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php new file mode 100644 index 00000000..a231739c --- /dev/null +++ b/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php @@ -0,0 +1,142 @@ +boolGetters = $boolGetters; + + return $new; + } + + /** + * @param bool $returnType + * + * @return NullableGetterAssemblerOptions + */ + public function withReturnType(bool $returnType = true): NullableGetterAssemblerOptions + { + $new = clone $this; + $new->returnType = $returnType; + + return $new; + } + + /** + * @return bool + */ + public function useBoolGetters(): bool + { + return $this->boolGetters; + } + + /** + * @return bool + */ + public function useReturnType(): bool + { + return $this->returnType; + } + + /** + * @param bool $withDocBlocks + * + * @return NullableGetterAssemblerOptions + */ + public function withDocBlocks(bool $withDocBlocks = true): NullableGetterAssemblerOptions + { + $new = clone $this; + $new->docBlocks = $withDocBlocks; + + return $new; + } + + /** + * @return bool + */ + public function useDocBlocks(): bool + { + return $this->docBlocks; + } + + public function withOptionalValue(bool $withOptionalValue = true): self + { + $new = clone $this; + $new->optionalValue = $withOptionalValue; + + return $new; + } + + public function useOptionalValue(): bool + { + return $this->optionalValue; + } + + /** + * @param bool $returnNull + * + * @return self + */ + public function withReturnNull(bool $returnNull = true): self + { + $new = clone $this; + $new->returnNull = $returnNull; + + return $new; + } + + /** + * @return bool + */ + public function useReturnNull(): bool + { + return $this->returnNull; + } +} diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 29112a70..025d1b2b 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -33,7 +33,10 @@ public static function addRules(Config $config, array $specialClassesAndProperti // We have to do this as the SOAP handler will erroneously create duplicate // public properties when a value object extends another one with those // same properties marked as "private". - $defaultPropertyAssembler = new Assembler\PropertyAssembler(PropertyGenerator::VISIBILITY_PROTECTED); + $defaultPropertyAssemblerOptions = (new Assembler\PropertyAssemblerOptions()) + ->withVisibility(PropertyGenerator::VISIBILITY_PRIVATE) + ->withTypeHints(false); + $defaultPropertyAssembler = new Assembler\PropertyAssembler($defaultPropertyAssemblerOptions); $arrayPropertyAssembler = new OpenEuropa\Assembler\ArrayPropertyAssembler( (new OpenEuropa\Assembler\ArrayPropertyAssemblerOptions()) @@ -56,8 +59,8 @@ public static function addRules(Config $config, array $specialClassesAndProperti ->whitelist($specialClassesAndProperties) ); - $defaultGetterAssembler = new Assembler\GetterAssembler( - (new Assembler\GetterAssemblerOptions()) + $defaultGetterAssembler = new OpenEuropa\Assembler\NullableGetterAssembler( + OpenEuropa\Assembler\NullableGetterAssemblerOptions::create() ->withReturnType() ->withBoolGetters() ->withReturnNull() diff --git a/src/Notification/Type/DgtNotification.php b/src/Notification/Type/DgtNotification.php index 70c58807..46468279 100644 --- a/src/Notification/Type/DgtNotification.php +++ b/src/Notification/Type/DgtNotification.php @@ -5,7 +5,7 @@ class DgtNotification { /** - * @var string + * @var \OpenEuropa\EPoetry\Notification\Type\NotificationType */ private $notificationType; @@ -35,19 +35,19 @@ class DgtNotification private $planningSector; /** - * @param string $notificationType + * @param \OpenEuropa\EPoetry\Notification\Type\NotificationType $notificationType * @return $this */ - public function setNotificationType(string $notificationType) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setNotificationType(\OpenEuropa\EPoetry\Notification\Type\NotificationType $notificationType) : static { $this->notificationType = $notificationType; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Notification\Type\NotificationType|null */ - public function getNotificationType() : ?string + public function getNotificationType() : ?\OpenEuropa\EPoetry\Notification\Type\NotificationType { return $this->notificationType; } @@ -64,7 +64,7 @@ public function hasNotificationType() : bool * @param \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest * @return $this */ - public function setLinguisticRequest(\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setLinguisticRequest(\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : static { $this->linguisticRequest = $linguisticRequest; return $this; @@ -90,7 +90,7 @@ public function hasLinguisticRequest() : bool * @param \OpenEuropa\EPoetry\Notification\Type\Product $product * @return $this */ - public function setProduct(\OpenEuropa\EPoetry\Notification\Type\Product $product) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setProduct(\OpenEuropa\EPoetry\Notification\Type\Product $product) : static { $this->product = $product; return $this; @@ -116,7 +116,7 @@ public function hasProduct() : bool * @param string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setMessage(string $message) : static { $this->message = $message; return $this; @@ -142,7 +142,7 @@ public function hasMessage() : bool * @param string $planningAgent * @return $this */ - public function setPlanningAgent(string $planningAgent) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setPlanningAgent(string $planningAgent) : static { $this->planningAgent = $planningAgent; return $this; @@ -168,7 +168,7 @@ public function hasPlanningAgent() : bool * @param string $planningSector * @return $this */ - public function setPlanningSector(string $planningSector) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setPlanningSector(string $planningSector) : static { $this->planningSector = $planningSector; return $this; diff --git a/src/Notification/Type/DgtNotificationResult.php b/src/Notification/Type/DgtNotificationResult.php index 536fcdb2..fa0c88f5 100644 --- a/src/Notification/Type/DgtNotificationResult.php +++ b/src/Notification/Type/DgtNotificationResult.php @@ -18,7 +18,7 @@ class DgtNotificationResult * @param bool $success * @return $this */ - public function setSuccess(bool $success) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + public function setSuccess(bool $success) : static { $this->success = $success; return $this; @@ -44,7 +44,7 @@ public function hasSuccess() : bool * @param string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + public function setMessage(string $message) : static { $this->message = $message; return $this; diff --git a/src/Notification/Type/LinguisticRequest.php b/src/Notification/Type/LinguisticRequest.php index 054aae0c..d2a2d28d 100644 --- a/src/Notification/Type/LinguisticRequest.php +++ b/src/Notification/Type/LinguisticRequest.php @@ -10,7 +10,7 @@ class LinguisticRequest private $requestReference; /** - * @var string + * @var \OpenEuropa\EPoetry\Notification\Type\RequestStatus */ private $status; @@ -18,7 +18,7 @@ class LinguisticRequest * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -41,19 +41,19 @@ public function hasRequestReference() : bool } /** - * @param string $status + * @param \OpenEuropa\EPoetry\Notification\Type\RequestStatus $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + public function setStatus(\OpenEuropa\EPoetry\Notification\Type\RequestStatus $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Notification\Type\RequestStatus|null */ - public function getStatus() : ?string + public function getStatus() : ?\OpenEuropa\EPoetry\Notification\Type\RequestStatus { return $this->status; } diff --git a/src/Notification/Type/Product.php b/src/Notification/Type/Product.php index 1d5b6e01..7081623e 100644 --- a/src/Notification/Type/Product.php +++ b/src/Notification/Type/Product.php @@ -10,7 +10,7 @@ class Product private $productReference; /** - * @var string + * @var \OpenEuropa\EPoetry\Notification\Type\ProductStatus */ private $status; @@ -20,7 +20,7 @@ class Product private $acceptedDeadline; /** - * @var string + * @var \OpenEuropa\EPoetry\Notification\Type\Base64Binary */ private $file; @@ -30,7 +30,7 @@ class Product private $name; /** - * @var string + * @var \OpenEuropa\EPoetry\Notification\Type\DocumentFormat */ private $format; @@ -38,7 +38,7 @@ class Product * @param \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference * @return $this */ - public function setProductReference(\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setProductReference(\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : static { $this->productReference = $productReference; return $this; @@ -61,19 +61,19 @@ public function hasProductReference() : bool } /** - * @param string $status + * @param \OpenEuropa\EPoetry\Notification\Type\ProductStatus $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setStatus(\OpenEuropa\EPoetry\Notification\Type\ProductStatus $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Notification\Type\ProductStatus|null */ - public function getStatus() : ?string + public function getStatus() : ?\OpenEuropa\EPoetry\Notification\Type\ProductStatus { return $this->status; } @@ -90,7 +90,7 @@ public function hasStatus() : bool * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; @@ -113,19 +113,19 @@ public function hasAcceptedDeadline() : bool } /** - * @param string $file + * @param \OpenEuropa\EPoetry\Notification\Type\Base64Binary $file * @return $this */ - public function setFile(string $file) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setFile(\OpenEuropa\EPoetry\Notification\Type\Base64Binary $file) : static { $this->file = $file; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Notification\Type\Base64Binary|null */ - public function getFile() : ?string + public function getFile() : ?\OpenEuropa\EPoetry\Notification\Type\Base64Binary { return $this->file; } @@ -142,7 +142,7 @@ public function hasFile() : bool * @param string $name * @return $this */ - public function setName(string $name) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setName(string $name) : static { $this->name = $name; return $this; @@ -165,19 +165,19 @@ public function hasName() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Notification\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setFormat(\OpenEuropa\EPoetry\Notification\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Notification\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Notification\Type\DocumentFormat { return $this->format; } diff --git a/src/Notification/Type/ProductReference.php b/src/Notification/Type/ProductReference.php index c254941f..1720b2b9 100644 --- a/src/Notification/Type/ProductReference.php +++ b/src/Notification/Type/ProductReference.php @@ -18,7 +18,7 @@ class ProductReference * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\ProductReference + public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -44,7 +44,7 @@ public function hasRequestReference() : bool * @param string $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Notification\Type\ProductReference + public function setLanguage(string $language) : static { $this->language = $language; return $this; diff --git a/src/Notification/Type/ReceiveNotification.php b/src/Notification/Type/ReceiveNotification.php index afee45fa..aee07372 100644 --- a/src/Notification/Type/ReceiveNotification.php +++ b/src/Notification/Type/ReceiveNotification.php @@ -15,7 +15,7 @@ class ReceiveNotification implements RequestInterface * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification * @return $this */ - public function setNotification(\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotification + public function setNotification(\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : static { $this->notification = $notification; return $this; diff --git a/src/Notification/Type/ReceiveNotificationResponse.php b/src/Notification/Type/ReceiveNotificationResponse.php index 9fc3a261..421afcae 100644 --- a/src/Notification/Type/ReceiveNotificationResponse.php +++ b/src/Notification/Type/ReceiveNotificationResponse.php @@ -15,7 +15,7 @@ class ReceiveNotificationResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotificationResponse + public function setReturn(\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : static { $this->return = $return; return $this; diff --git a/src/Notification/Type/RequestReference.php b/src/Notification/Type/RequestReference.php index 642e1de8..095737d2 100644 --- a/src/Notification/Type/RequestReference.php +++ b/src/Notification/Type/RequestReference.php @@ -38,7 +38,7 @@ class RequestReference * @param string $requesterCode * @return $this */ - public function setRequesterCode(string $requesterCode) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setRequesterCode(string $requesterCode) : static { $this->requesterCode = $requesterCode; return $this; @@ -64,7 +64,7 @@ public function hasRequesterCode() : bool * @param int $year * @return $this */ - public function setYear(int $year) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setYear(int $year) : static { $this->year = $year; return $this; @@ -90,7 +90,7 @@ public function hasYear() : bool * @param int $number * @return $this */ - public function setNumber(int $number) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setNumber(int $number) : static { $this->number = $number; return $this; @@ -116,7 +116,7 @@ public function hasNumber() : bool * @param int $part * @return $this */ - public function setPart(int $part) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setPart(int $part) : static { $this->part = $part; return $this; @@ -142,7 +142,7 @@ public function hasPart() : bool * @param int $version * @return $this */ - public function setVersion(int $version) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setVersion(int $version) : static { $this->version = $version; return $this; @@ -168,7 +168,7 @@ public function hasVersion() : bool * @param string $productType * @return $this */ - public function setProductType(string $productType) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setProductType(string $productType) : static { $this->productType = $productType; return $this; @@ -189,26 +189,5 @@ public function hasProductType() : bool { return !empty($this->productType); } - - /** - * Format request reference. - * - * @return string - */ - public function getReference(): string - { - $parts = [ - $this->getRequesterCode(), - $this->getYear(), - $this->getNumber(), - '('.$this->getVersion().')', - $this->getPart(), - $this->getProductType(), - ]; - $parts = array_filter($parts, function ($part) { - return $part !== null; - }); - return implode('-', $parts); - } } diff --git a/src/Request/RequestClient.php b/src/Request/RequestClient.php index c4cda071..a655f7e4 100644 --- a/src/Request/RequestClient.php +++ b/src/Request/RequestClient.php @@ -21,82 +21,122 @@ public function __construct(\Phpro\SoapClient\Caller\Caller $caller) } /** - * @param RequestInterface|Type\ResubmitRequest $parameters - * @return ResultInterface|Type\ResubmitRequestResponse + * @param RequestInterface & Type\ResubmitRequest $parameters + * @return ResultInterface & Type\ResubmitRequestResponse * @throws SoapException */ public function resubmitRequest(\OpenEuropa\EPoetry\Request\Type\ResubmitRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse { - return ($this->caller)('resubmitRequest', $parameters); + $response = ($this->caller)('resubmitRequest', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\UpdateCallbackUrl $parameters - * @return ResultInterface|Type\UpdateCallbackUrlResponse + * @param RequestInterface & Type\UpdateCallbackUrl $parameters + * @return ResultInterface & Type\UpdateCallbackUrlResponse * @throws SoapException */ public function updateCallbackUrl(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl $parameters) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse { - return ($this->caller)('updateCallbackUrl', $parameters); + $response = ($this->caller)('updateCallbackUrl', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\ModifyLinguisticRequest $parameters - * @return ResultInterface|Type\ModifyLinguisticRequestResponse + * @param RequestInterface & Type\ModifyLinguisticRequest $parameters + * @return ResultInterface & Type\ModifyLinguisticRequestResponse * @throws SoapException */ public function modifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse { - return ($this->caller)('modifyLinguisticRequest', $parameters); + $response = ($this->caller)('modifyLinguisticRequest', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\AddNewPartToDossier $parameters - * @return ResultInterface|Type\AddNewPartToDossierResponse + * @param RequestInterface & Type\AddNewPartToDossier $parameters + * @return ResultInterface & Type\AddNewPartToDossierResponse * @throws SoapException */ public function addNewPartToDossier(\OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier $parameters) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse { - return ($this->caller)('addNewPartToDossier', $parameters); + $response = ($this->caller)('addNewPartToDossier', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\CreateNewVersion $parameters - * @return ResultInterface|Type\CreateNewVersionResponse + * @param RequestInterface & Type\CreateNewVersion $parameters + * @return ResultInterface & Type\CreateNewVersionResponse * @throws SoapException */ public function createNewVersion(\OpenEuropa\EPoetry\Request\Type\CreateNewVersion $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse { - return ($this->caller)('createNewVersion', $parameters); + $response = ($this->caller)('createNewVersion', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\GetLinguisticRequest $parameters - * @return ResultInterface|Type\GetLinguisticRequestResponse + * @param RequestInterface & Type\GetLinguisticRequest $parameters + * @return ResultInterface & Type\GetLinguisticRequestResponse * @throws SoapException */ public function getLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse { - return ($this->caller)('getLinguisticRequest', $parameters); + $response = ($this->caller)('getLinguisticRequest', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\CreateLinguisticRequest $parameters - * @return ResultInterface|Type\CreateLinguisticRequestResponse + * @param RequestInterface & Type\CreateLinguisticRequest $parameters + * @return ResultInterface & Type\CreateLinguisticRequestResponse * @throws SoapException */ public function createLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse { - return ($this->caller)('createLinguisticRequest', $parameters); + $response = ($this->caller)('createLinguisticRequest', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } /** - * @param RequestInterface|Type\CreateCorrectionRequest $parameters - * @return ResultInterface|Type\CreateCorrectionRequestResponse + * @param RequestInterface & Type\CreateCorrectionRequest $parameters + * @return ResultInterface & Type\CreateCorrectionRequestResponse * @throws SoapException */ public function createCorrectionRequest(\OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse { - return ($this->caller)('createCorrectionRequest', $parameters); + $response = ($this->caller)('createCorrectionRequest', $parameters); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } } diff --git a/src/Request/Type/AddNewPartToDossier.php b/src/Request/Type/AddNewPartToDossier.php index 4e22ff9e..63a234f2 100644 --- a/src/Request/Type/AddNewPartToDossier.php +++ b/src/Request/Type/AddNewPartToDossier.php @@ -30,7 +30,7 @@ class AddNewPartToDossier implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; @@ -56,7 +56,7 @@ public function hasDossier() : bool * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; @@ -82,7 +82,7 @@ public function hasRequestDetails() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; @@ -108,7 +108,7 @@ public function hasApplicationName() : bool * @param string $templateName * @return $this */ - public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier + public function setTemplateName(string $templateName) : static { $this->templateName = $templateName; return $this; diff --git a/src/Request/Type/AddNewPartToDossierResponse.php b/src/Request/Type/AddNewPartToDossierResponse.php index 84e47a66..4545df3d 100644 --- a/src/Request/Type/AddNewPartToDossierResponse.php +++ b/src/Request/Type/AddNewPartToDossierResponse.php @@ -15,7 +15,7 @@ class AddNewPartToDossierResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/AuxiliaryDocumentOut.php b/src/Request/Type/AuxiliaryDocumentOut.php index 3c1321ad..aec8f7fc 100644 --- a/src/Request/Type/AuxiliaryDocumentOut.php +++ b/src/Request/Type/AuxiliaryDocumentOut.php @@ -10,12 +10,12 @@ class AuxiliaryDocumentOut private $fileName; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentType */ private $documentType; @@ -25,7 +25,7 @@ class AuxiliaryDocumentOut private $comment; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat */ private $format; @@ -33,7 +33,7 @@ class AuxiliaryDocumentOut * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -56,19 +56,19 @@ public function hasFileName() : bool } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -82,19 +82,19 @@ public function hasLanguage() : bool } /** - * @param string $documentType + * @param \OpenEuropa\EPoetry\Request\Type\DocumentType $documentType * @return $this */ - public function setDocumentType(string $documentType) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut + public function setDocumentType(\OpenEuropa\EPoetry\Request\Type\DocumentType $documentType) : static { $this->documentType = $documentType; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentType|null */ - public function getDocumentType() : ?string + public function getDocumentType() : ?\OpenEuropa\EPoetry\Request\Type\DocumentType { return $this->documentType; } @@ -111,7 +111,7 @@ public function hasDocumentType() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -134,19 +134,19 @@ public function hasComment() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut + public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat { return $this->format; } diff --git a/src/Request/Type/AuxiliaryDocuments.php b/src/Request/Type/AuxiliaryDocuments.php index 73d7ddab..231ac96e 100644 --- a/src/Request/Type/AuxiliaryDocuments.php +++ b/src/Request/Type/AuxiliaryDocuments.php @@ -13,7 +13,7 @@ class AuxiliaryDocuments * @param AuxiliaryDocumentOut[] $document * @return $this */ - public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments + public function setDocument(array $document) : static { $this->document = $document; return $this; diff --git a/src/Request/Type/AuxiliaryDocumentsIn.php b/src/Request/Type/AuxiliaryDocumentsIn.php index d1a65cd5..6763ae2a 100644 --- a/src/Request/Type/AuxiliaryDocumentsIn.php +++ b/src/Request/Type/AuxiliaryDocumentsIn.php @@ -33,7 +33,7 @@ class AuxiliaryDocumentsIn * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static { $this->referenceDocuments = $referenceDocuments; return $this; @@ -59,7 +59,7 @@ public function hasReferenceDocuments() : bool * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static { $this->traxDocuments = $traxDocuments; return $this; @@ -85,7 +85,7 @@ public function hasTraxDocuments() : bool * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static { $this->spotDocument = $spotDocument; return $this; @@ -111,7 +111,7 @@ public function hasSpotDocument() : bool * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static { $this->prtDocuments = $prtDocuments; return $this; @@ -137,7 +137,7 @@ public function hasPrtDocuments() : bool * @param \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument * @return $this */ - public function setSrcDocument(\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + public function setSrcDocument(\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : static { $this->srcDocument = $srcDocument; return $this; diff --git a/src/Request/Type/ContactPersonIn.php b/src/Request/Type/ContactPersonIn.php index 27c6d075..be020931 100644 --- a/src/Request/Type/ContactPersonIn.php +++ b/src/Request/Type/ContactPersonIn.php @@ -10,17 +10,17 @@ class ContactPersonIn private $userId; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\ContactRole */ private $contactRole; /** * Constructor * - * @var string $userId - * @var string $contactRole + * @param string $userId + * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole */ - public function __construct(string $userId, string $contactRole) + public function __construct(string $userId, \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole) { $this->userId = $userId; $this->contactRole = $contactRole; @@ -30,7 +30,7 @@ public function __construct(string $userId, string $contactRole) * @param string $userId * @return $this */ - public function setUserId(string $userId) : \OpenEuropa\EPoetry\Request\Type\ContactPersonIn + public function setUserId(string $userId) : static { $this->userId = $userId; return $this; @@ -53,19 +53,19 @@ public function hasUserId() : bool } /** - * @param string $contactRole + * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole * @return $this */ - public function setContactRole(string $contactRole) : \OpenEuropa\EPoetry\Request\Type\ContactPersonIn + public function setContactRole(\OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole) : static { $this->contactRole = $contactRole; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\ContactRole|null */ - public function getContactRole() : ?string + public function getContactRole() : ?\OpenEuropa\EPoetry\Request\Type\ContactRole { return $this->contactRole; } diff --git a/src/Request/Type/ContactPersonOut.php b/src/Request/Type/ContactPersonOut.php index 3f378b7c..befc4bd1 100644 --- a/src/Request/Type/ContactPersonOut.php +++ b/src/Request/Type/ContactPersonOut.php @@ -25,20 +25,20 @@ class ContactPersonOut private $userId; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\ContactRole */ private $roleCode; /** * Constructor * - * @var string $firstName - * @var string $lastName - * @var string $email - * @var string $userId - * @var string $roleCode + * @param string $firstName + * @param string $lastName + * @param string $email + * @param string $userId + * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode */ - public function __construct(string $firstName, string $lastName, string $email, string $userId, string $roleCode) + public function __construct(string $firstName, string $lastName, string $email, string $userId, \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode) { $this->firstName = $firstName; $this->lastName = $lastName; @@ -51,7 +51,7 @@ public function __construct(string $firstName, string $lastName, string $email, * @param string $firstName * @return $this */ - public function setFirstName(string $firstName) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut + public function setFirstName(string $firstName) : static { $this->firstName = $firstName; return $this; @@ -77,7 +77,7 @@ public function hasFirstName() : bool * @param string $lastName * @return $this */ - public function setLastName(string $lastName) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut + public function setLastName(string $lastName) : static { $this->lastName = $lastName; return $this; @@ -103,7 +103,7 @@ public function hasLastName() : bool * @param string $email * @return $this */ - public function setEmail(string $email) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut + public function setEmail(string $email) : static { $this->email = $email; return $this; @@ -129,7 +129,7 @@ public function hasEmail() : bool * @param string $userId * @return $this */ - public function setUserId(string $userId) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut + public function setUserId(string $userId) : static { $this->userId = $userId; return $this; @@ -152,19 +152,19 @@ public function hasUserId() : bool } /** - * @param string $roleCode + * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode * @return $this */ - public function setRoleCode(string $roleCode) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut + public function setRoleCode(\OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode) : static { $this->roleCode = $roleCode; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\ContactRole|null */ - public function getRoleCode() : ?string + public function getRoleCode() : ?\OpenEuropa\EPoetry\Request\Type\ContactRole { return $this->roleCode; } diff --git a/src/Request/Type/Contacts.php b/src/Request/Type/Contacts.php index f51be847..6ffe0e8f 100644 --- a/src/Request/Type/Contacts.php +++ b/src/Request/Type/Contacts.php @@ -13,7 +13,7 @@ class Contacts * @param ContactPersonIn[] $contact * @return $this */ - public function setContact(array $contact) : \OpenEuropa\EPoetry\Request\Type\Contacts + public function setContact(array $contact) : static { $this->contact = $contact; return $this; diff --git a/src/Request/Type/CorrectionDetailsIn.php b/src/Request/Type/CorrectionDetailsIn.php index 3ba1b983..cc655241 100644 --- a/src/Request/Type/CorrectionDetailsIn.php +++ b/src/Request/Type/CorrectionDetailsIn.php @@ -15,17 +15,17 @@ class CorrectionDetailsIn private $fileName; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary */ private $content; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat */ private $format; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -38,7 +38,7 @@ class CorrectionDetailsIn * @param \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -64,7 +64,7 @@ public function hasRequestReference() : bool * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -87,19 +87,19 @@ public function hasFileName() : bool } /** - * @param string $content + * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content * @return $this */ - public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static { $this->content = $content; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null */ - public function getContent() : ?string + public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary { return $this->content; } @@ -113,19 +113,19 @@ public function hasContent() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat { return $this->format; } @@ -139,19 +139,19 @@ public function hasFormat() : bool } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -168,7 +168,7 @@ public function hasLanguage() : bool * @param string $remark * @return $this */ - public function setRemark(string $remark) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + public function setRemark(string $remark) : static { $this->remark = $remark; return $this; diff --git a/src/Request/Type/CorrectionReferenceIn.php b/src/Request/Type/CorrectionReferenceIn.php index 55d39868..d3ebfc88 100644 --- a/src/Request/Type/CorrectionReferenceIn.php +++ b/src/Request/Type/CorrectionReferenceIn.php @@ -13,7 +13,7 @@ class CorrectionReferenceIn * @param int $version * @return $this */ - public function setVersion(int $version) : \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn + public function setVersion(int $version) : static { $this->version = $version; return $this; diff --git a/src/Request/Type/CorrectionRequestOut.php b/src/Request/Type/CorrectionRequestOut.php index f215c372..a924eeaf 100644 --- a/src/Request/Type/CorrectionRequestOut.php +++ b/src/Request/Type/CorrectionRequestOut.php @@ -18,7 +18,7 @@ class CorrectionRequestOut * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -44,7 +44,7 @@ public function hasRequestReference() : bool * @param \OpenEuropa\EPoetry\Request\Type\DcoOut $DCO * @return $this */ - public function setDCO(\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut + public function setDCO(\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : static { $this->DCO = $DCO; return $this; diff --git a/src/Request/Type/CreateCorrectionRequest.php b/src/Request/Type/CreateCorrectionRequest.php index cb272d8b..a9a3c201 100644 --- a/src/Request/Type/CreateCorrectionRequest.php +++ b/src/Request/Type/CreateCorrectionRequest.php @@ -20,7 +20,7 @@ class CreateCorrectionRequest implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails * @return $this */ - public function setCorrectionDetails(\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest + public function setCorrectionDetails(\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : static { $this->correctionDetails = $correctionDetails; return $this; @@ -46,7 +46,7 @@ public function hasCorrectionDetails() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; diff --git a/src/Request/Type/CreateCorrectionRequestResponse.php b/src/Request/Type/CreateCorrectionRequestResponse.php index ff52c0b0..e4c1b7e2 100644 --- a/src/Request/Type/CreateCorrectionRequestResponse.php +++ b/src/Request/Type/CreateCorrectionRequestResponse.php @@ -15,7 +15,7 @@ class CreateCorrectionRequestResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/CreateLinguisticRequest.php b/src/Request/Type/CreateLinguisticRequest.php index eac0bc14..887d8309 100644 --- a/src/Request/Type/CreateLinguisticRequest.php +++ b/src/Request/Type/CreateLinguisticRequest.php @@ -25,7 +25,7 @@ class CreateLinguisticRequest implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; @@ -51,7 +51,7 @@ public function hasRequestDetails() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; @@ -77,7 +77,7 @@ public function hasApplicationName() : bool * @param string $templateName * @return $this */ - public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest + public function setTemplateName(string $templateName) : static { $this->templateName = $templateName; return $this; diff --git a/src/Request/Type/CreateLinguisticRequestResponse.php b/src/Request/Type/CreateLinguisticRequestResponse.php index 461ba8ed..4b03def5 100644 --- a/src/Request/Type/CreateLinguisticRequestResponse.php +++ b/src/Request/Type/CreateLinguisticRequestResponse.php @@ -15,7 +15,7 @@ class CreateLinguisticRequestResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/CreateNewVersion.php b/src/Request/Type/CreateNewVersion.php index b53f49f8..3e5e1781 100644 --- a/src/Request/Type/CreateNewVersion.php +++ b/src/Request/Type/CreateNewVersion.php @@ -20,7 +20,7 @@ class CreateNewVersion implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest * @return $this */ - public function setLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersion + public function setLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : static { $this->linguisticRequest = $linguisticRequest; return $this; @@ -46,7 +46,7 @@ public function hasLinguisticRequest() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersion + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; diff --git a/src/Request/Type/CreateNewVersionResponse.php b/src/Request/Type/CreateNewVersionResponse.php index efcb5836..56d184b4 100644 --- a/src/Request/Type/CreateNewVersionResponse.php +++ b/src/Request/Type/CreateNewVersionResponse.php @@ -15,7 +15,7 @@ class CreateNewVersionResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/DcoOut.php b/src/Request/Type/DcoOut.php index cdb63c5a..65568e9a 100644 --- a/src/Request/Type/DcoOut.php +++ b/src/Request/Type/DcoOut.php @@ -20,12 +20,12 @@ class DcoOut private $fileName; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat */ private $format; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -35,7 +35,7 @@ class DcoOut private $remark; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\RequestStatus */ private $status; @@ -43,7 +43,7 @@ class DcoOut * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; @@ -69,7 +69,7 @@ public function hasApplicationName() : bool * @param \DateTimeInterface $deadline * @return $this */ - public function setDeadline(\DateTimeInterface $deadline) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setDeadline(\DateTimeInterface $deadline) : static { $this->deadline = $deadline; return $this; @@ -95,7 +95,7 @@ public function hasDeadline() : bool * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -118,19 +118,19 @@ public function hasFileName() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat { return $this->format; } @@ -144,19 +144,19 @@ public function hasFormat() : bool } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -173,7 +173,7 @@ public function hasLanguage() : bool * @param string $remark * @return $this */ - public function setRemark(string $remark) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setRemark(string $remark) : static { $this->remark = $remark; return $this; @@ -196,19 +196,19 @@ public function hasRemark() : bool } /** - * @param string $status + * @param \OpenEuropa\EPoetry\Request\Type\RequestStatus $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\DcoOut + public function setStatus(\OpenEuropa\EPoetry\Request\Type\RequestStatus $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\RequestStatus|null */ - public function getStatus() : ?string + public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\RequestStatus { return $this->status; } diff --git a/src/Request/Type/DocumentIn.php b/src/Request/Type/DocumentIn.php index e85a3f42..ae8e5aaf 100644 --- a/src/Request/Type/DocumentIn.php +++ b/src/Request/Type/DocumentIn.php @@ -10,7 +10,7 @@ class DocumentIn private $fileName; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -20,7 +20,7 @@ class DocumentIn private $comment; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary */ private $content; @@ -28,7 +28,7 @@ class DocumentIn * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\DocumentIn + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -51,19 +51,19 @@ public function hasFileName() : bool } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\DocumentIn + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -80,7 +80,7 @@ public function hasLanguage() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\DocumentIn + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -103,19 +103,19 @@ public function hasComment() : bool } /** - * @param string $content + * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content * @return $this */ - public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\DocumentIn + public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static { $this->content = $content; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null */ - public function getContent() : ?string + public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary { return $this->content; } diff --git a/src/Request/Type/DossierReference.php b/src/Request/Type/DossierReference.php index 927566ea..0dbac799 100644 --- a/src/Request/Type/DossierReference.php +++ b/src/Request/Type/DossierReference.php @@ -23,7 +23,7 @@ class DossierReference * @param string $requesterCode * @return $this */ - public function setRequesterCode(string $requesterCode) : \OpenEuropa\EPoetry\Request\Type\DossierReference + public function setRequesterCode(string $requesterCode) : static { $this->requesterCode = $requesterCode; return $this; @@ -49,7 +49,7 @@ public function hasRequesterCode() : bool * @param int $number * @return $this */ - public function setNumber(int $number) : \OpenEuropa\EPoetry\Request\Type\DossierReference + public function setNumber(int $number) : static { $this->number = $number; return $this; @@ -75,7 +75,7 @@ public function hasNumber() : bool * @param int $year * @return $this */ - public function setYear(int $year) : \OpenEuropa\EPoetry\Request\Type\DossierReference + public function setYear(int $year) : static { $this->year = $year; return $this; diff --git a/src/Request/Type/GetLinguisticRequest.php b/src/Request/Type/GetLinguisticRequest.php index d100cd69..0bdbee0f 100644 --- a/src/Request/Type/GetLinguisticRequest.php +++ b/src/Request/Type/GetLinguisticRequest.php @@ -20,7 +20,7 @@ class GetLinguisticRequest implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -46,7 +46,7 @@ public function hasRequestReference() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; diff --git a/src/Request/Type/GetLinguisticRequestResponse.php b/src/Request/Type/GetLinguisticRequestResponse.php index e5642a4e..26a82b33 100644 --- a/src/Request/Type/GetLinguisticRequestResponse.php +++ b/src/Request/Type/GetLinguisticRequestResponse.php @@ -15,7 +15,7 @@ class GetLinguisticRequestResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/InformativeMessages.php b/src/Request/Type/InformativeMessages.php index 6a979c90..2d2faa66 100644 --- a/src/Request/Type/InformativeMessages.php +++ b/src/Request/Type/InformativeMessages.php @@ -13,7 +13,7 @@ class InformativeMessages * @param string[] $message * @return $this */ - public function setMessage(array $message) : \OpenEuropa\EPoetry\Request\Type\InformativeMessages + public function setMessage(array $message) : static { $this->message = $message; return $this; diff --git a/src/Request/Type/LinguisticRequestIn.php b/src/Request/Type/LinguisticRequestIn.php index 4a027844..1ca1e202 100644 --- a/src/Request/Type/LinguisticRequestIn.php +++ b/src/Request/Type/LinguisticRequestIn.php @@ -18,7 +18,7 @@ class LinguisticRequestIn * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -44,7 +44,7 @@ public function hasRequestReference() : bool * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; diff --git a/src/Request/Type/LinguisticRequestOut.php b/src/Request/Type/LinguisticRequestOut.php index 39c5d0b2..20450490 100644 --- a/src/Request/Type/LinguisticRequestOut.php +++ b/src/Request/Type/LinguisticRequestOut.php @@ -23,7 +23,7 @@ class LinguisticRequestOut * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -49,7 +49,7 @@ public function hasRequestReference() : bool * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; @@ -75,7 +75,7 @@ public function hasRequestDetails() : bool * @param \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages * @return $this */ - public function setInformativeMessages(\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + public function setInformativeMessages(\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static { $this->informativeMessages = $informativeMessages; return $this; diff --git a/src/Request/Type/LinguisticSectionIn.php b/src/Request/Type/LinguisticSectionIn.php index f68f6d69..1391c52c 100644 --- a/src/Request/Type/LinguisticSectionIn.php +++ b/src/Request/Type/LinguisticSectionIn.php @@ -5,34 +5,34 @@ class LinguisticSectionIn { /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; /** * Constructor * - * @var string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language */ - public function __construct(string $language) + public function __construct(\OpenEuropa\EPoetry\Request\Type\Language $language) { $this->language = $language; } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\LinguisticSectionIn + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } diff --git a/src/Request/Type/LinguisticSectionOut.php b/src/Request/Type/LinguisticSectionOut.php index 0f8317ef..c925d01e 100644 --- a/src/Request/Type/LinguisticSectionOut.php +++ b/src/Request/Type/LinguisticSectionOut.php @@ -5,34 +5,34 @@ class LinguisticSectionOut { /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; /** * Constructor * - * @var string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language */ - public function __construct(string $language) + public function __construct(\OpenEuropa\EPoetry\Request\Type\Language $language) { $this->language = $language; } /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } diff --git a/src/Request/Type/LinguisticSections.php b/src/Request/Type/LinguisticSections.php index 378cf6f0..ba84a9a2 100644 --- a/src/Request/Type/LinguisticSections.php +++ b/src/Request/Type/LinguisticSections.php @@ -13,7 +13,7 @@ class LinguisticSections * @param LinguisticSectionOut[] $linguisticSection * @return $this */ - public function setLinguisticSection(array $linguisticSection) : \OpenEuropa\EPoetry\Request\Type\LinguisticSections + public function setLinguisticSection(array $linguisticSection) : static { $this->linguisticSection = $linguisticSection; return $this; diff --git a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php index 9202d6ee..966084c3 100644 --- a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php +++ b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php @@ -28,7 +28,7 @@ class ModifyAuxiliaryDocumentsIn * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static { $this->referenceDocuments = $referenceDocuments; return $this; @@ -54,7 +54,7 @@ public function hasReferenceDocuments() : bool * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static { $this->traxDocuments = $traxDocuments; return $this; @@ -80,7 +80,7 @@ public function hasTraxDocuments() : bool * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static { $this->spotDocument = $spotDocument; return $this; @@ -106,7 +106,7 @@ public function hasSpotDocument() : bool * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static { $this->prtDocuments = $prtDocuments; return $this; diff --git a/src/Request/Type/ModifyLinguisticRequest.php b/src/Request/Type/ModifyLinguisticRequest.php index 7c91c130..dc4f8485 100644 --- a/src/Request/Type/ModifyLinguisticRequest.php +++ b/src/Request/Type/ModifyLinguisticRequest.php @@ -20,7 +20,7 @@ class ModifyLinguisticRequest implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest * @return $this */ - public function setModifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest + public function setModifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : static { $this->modifyLinguisticRequest = $modifyLinguisticRequest; return $this; @@ -46,7 +46,7 @@ public function hasModifyLinguisticRequest() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; diff --git a/src/Request/Type/ModifyLinguisticRequestIn.php b/src/Request/Type/ModifyLinguisticRequestIn.php index efc7ab16..df6dd872 100644 --- a/src/Request/Type/ModifyLinguisticRequestIn.php +++ b/src/Request/Type/ModifyLinguisticRequestIn.php @@ -18,7 +18,7 @@ class ModifyLinguisticRequestIn * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; @@ -44,7 +44,7 @@ public function hasRequestReference() : bool * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; diff --git a/src/Request/Type/ModifyLinguisticRequestResponse.php b/src/Request/Type/ModifyLinguisticRequestResponse.php index ba1bc525..87872b98 100644 --- a/src/Request/Type/ModifyLinguisticRequestResponse.php +++ b/src/Request/Type/ModifyLinguisticRequestResponse.php @@ -15,7 +15,7 @@ class ModifyLinguisticRequestResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/ModifyProductRequestIn.php b/src/Request/Type/ModifyProductRequestIn.php index db6bc0e1..1881b08e 100644 --- a/src/Request/Type/ModifyProductRequestIn.php +++ b/src/Request/Type/ModifyProductRequestIn.php @@ -5,7 +5,7 @@ class ModifyProductRequestIn { /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -20,19 +20,19 @@ class ModifyProductRequestIn private $trackChanges; /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -49,7 +49,7 @@ public function hasLanguage() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; @@ -75,7 +75,7 @@ public function hasRequestedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn + public function setTrackChanges(bool $trackChanges) : static { $this->trackChanges = $trackChanges; return $this; diff --git a/src/Request/Type/ModifyRequestDetailsIn.php b/src/Request/Type/ModifyRequestDetailsIn.php index a83a4a9b..5af0eb8a 100644 --- a/src/Request/Type/ModifyRequestDetailsIn.php +++ b/src/Request/Type/ModifyRequestDetailsIn.php @@ -23,7 +23,7 @@ class ModifyRequestDetailsIn * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static { $this->contacts = $contacts; return $this; @@ -49,7 +49,7 @@ public function hasContacts() : bool * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static { $this->products = $products; return $this; @@ -75,7 +75,7 @@ public function hasProducts() : bool * @param \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; diff --git a/src/Request/Type/ModifyRequestReferenceIn.php b/src/Request/Type/ModifyRequestReferenceIn.php index 41ef8f10..bacebe35 100644 --- a/src/Request/Type/ModifyRequestReferenceIn.php +++ b/src/Request/Type/ModifyRequestReferenceIn.php @@ -23,7 +23,7 @@ class ModifyRequestReferenceIn * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; @@ -49,7 +49,7 @@ public function hasDossier() : bool * @param string $productType * @return $this */ - public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + public function setProductType(string $productType) : static { $this->productType = $productType; return $this; @@ -75,7 +75,7 @@ public function hasProductType() : bool * @param int $part * @return $this */ - public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + public function setPart(int $part) : static { $this->part = $part; return $this; diff --git a/src/Request/Type/NoSuchMethodException.php b/src/Request/Type/NoSuchMethodException.php index 093fd8cb..5531e726 100644 --- a/src/Request/Type/NoSuchMethodException.php +++ b/src/Request/Type/NoSuchMethodException.php @@ -13,7 +13,7 @@ class NoSuchMethodException * @param string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\NoSuchMethodException + public function setMessage(string $message) : static { $this->message = $message; return $this; diff --git a/src/Request/Type/OriginalDocumentIn.php b/src/Request/Type/OriginalDocumentIn.php index 035dc6d3..92f16344 100644 --- a/src/Request/Type/OriginalDocumentIn.php +++ b/src/Request/Type/OriginalDocumentIn.php @@ -15,7 +15,7 @@ class OriginalDocumentIn private $comment; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary */ private $content; @@ -33,7 +33,7 @@ class OriginalDocumentIn * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -59,7 +59,7 @@ public function hasFileName() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -82,19 +82,19 @@ public function hasComment() : bool } /** - * @param string $content + * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content * @return $this */ - public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static { $this->content = $content; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null */ - public function getContent() : ?string + public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary { return $this->content; } @@ -111,7 +111,7 @@ public function hasContent() : bool * @param \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections * @return $this */ - public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static { $this->linguisticSections = $linguisticSections; return $this; @@ -137,7 +137,7 @@ public function hasLinguisticSections() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function setTrackChanges(bool $trackChanges) : static { $this->trackChanges = $trackChanges; return $this; diff --git a/src/Request/Type/OriginalDocumentOut.php b/src/Request/Type/OriginalDocumentOut.php index 2cb6cc81..a0e760b7 100644 --- a/src/Request/Type/OriginalDocumentOut.php +++ b/src/Request/Type/OriginalDocumentOut.php @@ -10,7 +10,7 @@ class OriginalDocumentOut private $trackChanges; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat */ private $format; @@ -38,7 +38,7 @@ class OriginalDocumentOut * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setTrackChanges(bool $trackChanges) : static { $this->trackChanges = $trackChanges; return $this; @@ -61,19 +61,19 @@ public function hasTrackChanges() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat { return $this->format; } @@ -90,7 +90,7 @@ public function hasFormat() : bool * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -116,7 +116,7 @@ public function hasFileName() : bool * @param float $pages * @return $this */ - public function setPages(float $pages) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setPages(float $pages) : static { $this->pages = $pages; return $this; @@ -142,7 +142,7 @@ public function hasPages() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -168,7 +168,7 @@ public function hasComment() : bool * @param \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections * @return $this */ - public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static { $this->linguisticSections = $linguisticSections; return $this; diff --git a/src/Request/Type/ProductRequestIn.php b/src/Request/Type/ProductRequestIn.php index 8a0c1662..612688fc 100644 --- a/src/Request/Type/ProductRequestIn.php +++ b/src/Request/Type/ProductRequestIn.php @@ -5,7 +5,7 @@ class ProductRequestIn { /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -20,19 +20,19 @@ class ProductRequestIn private $trackChanges; /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -49,7 +49,7 @@ public function hasLanguage() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; @@ -75,7 +75,7 @@ public function hasRequestedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn + public function setTrackChanges(bool $trackChanges) : static { $this->trackChanges = $trackChanges; return $this; diff --git a/src/Request/Type/ProductRequestOut.php b/src/Request/Type/ProductRequestOut.php index f0edb2d6..93ae30e4 100644 --- a/src/Request/Type/ProductRequestOut.php +++ b/src/Request/Type/ProductRequestOut.php @@ -5,7 +5,7 @@ class ProductRequestOut { /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Language */ private $language; @@ -25,29 +25,29 @@ class ProductRequestOut private $trackChanges; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\ProductStatus */ private $status; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat */ private $format; /** - * @param string $language + * @param \OpenEuropa\EPoetry\Request\Type\Language $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Language|null */ - public function getLanguage() : ?string + public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language { return $this->language; } @@ -64,7 +64,7 @@ public function hasLanguage() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; @@ -90,7 +90,7 @@ public function hasRequestedDeadline() : bool * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; @@ -116,7 +116,7 @@ public function hasAcceptedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setTrackChanges(bool $trackChanges) : static { $this->trackChanges = $trackChanges; return $this; @@ -139,19 +139,19 @@ public function hasTrackChanges() : bool } /** - * @param string $status + * @param \OpenEuropa\EPoetry\Request\Type\ProductStatus $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setStatus(\OpenEuropa\EPoetry\Request\Type\ProductStatus $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\ProductStatus|null */ - public function getStatus() : ?string + public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\ProductStatus { return $this->status; } @@ -165,19 +165,19 @@ public function hasStatus() : bool } /** - * @param string $format + * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut + public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null */ - public function getFormat() : ?string + public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat { return $this->format; } diff --git a/src/Request/Type/Products.php b/src/Request/Type/Products.php index 69a4bc05..2a1f9b20 100644 --- a/src/Request/Type/Products.php +++ b/src/Request/Type/Products.php @@ -13,7 +13,7 @@ class Products * @param ModifyProductRequestIn[] $product * @return $this */ - public function setProduct(array $product) : \OpenEuropa\EPoetry\Request\Type\Products + public function setProduct(array $product) : static { $this->product = $product; return $this; diff --git a/src/Request/Type/PrtDocuments.php b/src/Request/Type/PrtDocuments.php index 7365882a..4eb19546 100644 --- a/src/Request/Type/PrtDocuments.php +++ b/src/Request/Type/PrtDocuments.php @@ -13,7 +13,7 @@ class PrtDocuments * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\PrtDocuments + public function setDocument(array $document) : static { $this->document = $document; return $this; diff --git a/src/Request/Type/ReferenceDocuments.php b/src/Request/Type/ReferenceDocuments.php index ca25aa9e..9418dd92 100644 --- a/src/Request/Type/ReferenceDocuments.php +++ b/src/Request/Type/ReferenceDocuments.php @@ -13,7 +13,7 @@ class ReferenceDocuments * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + public function setDocument(array $document) : static { $this->document = $document; return $this; diff --git a/src/Request/Type/RequestDetailsIn.php b/src/Request/Type/RequestDetailsIn.php index 484a930e..f88fa697 100644 --- a/src/Request/Type/RequestDetailsIn.php +++ b/src/Request/Type/RequestDetailsIn.php @@ -10,7 +10,7 @@ class RequestDetailsIn private $title; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\WorkflowCode */ private $workflowCode; @@ -45,17 +45,17 @@ class RequestDetailsIn private $decideReference; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Destination */ private $destination; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Procedure */ private $procedure; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\SlaAnnex */ private $slaAnnex; @@ -75,7 +75,7 @@ class RequestDetailsIn private $onBehalfOf; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\AccessLevel */ private $accessibleTo; @@ -118,7 +118,7 @@ class RequestDetailsIn * @param string $title * @return $this */ - public function setTitle(string $title) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setTitle(string $title) : static { $this->title = $title; return $this; @@ -141,19 +141,19 @@ public function hasTitle() : bool } /** - * @param string $workflowCode + * @param \OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode * @return $this */ - public function setWorkflowCode(string $workflowCode) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setWorkflowCode(\OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode) : static { $this->workflowCode = $workflowCode; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\WorkflowCode|null */ - public function getWorkflowCode() : ?string + public function getWorkflowCode() : ?\OpenEuropa\EPoetry\Request\Type\WorkflowCode { return $this->workflowCode; } @@ -170,7 +170,7 @@ public function hasWorkflowCode() : bool * @param string $internalReference * @return $this */ - public function setInternalReference(string $internalReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setInternalReference(string $internalReference) : static { $this->internalReference = $internalReference; return $this; @@ -196,7 +196,7 @@ public function hasInternalReference() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; @@ -222,7 +222,7 @@ public function hasRequestedDeadline() : bool * @param bool $sensitive * @return $this */ - public function setSensitive(bool $sensitive) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setSensitive(bool $sensitive) : static { $this->sensitive = $sensitive; return $this; @@ -248,7 +248,7 @@ public function hasSensitive() : bool * @param bool $sentViaRue * @return $this */ - public function setSentViaRue(bool $sentViaRue) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setSentViaRue(bool $sentViaRue) : static { $this->sentViaRue = $sentViaRue; return $this; @@ -274,7 +274,7 @@ public function hasSentViaRue() : bool * @param bool $documentToAdopt * @return $this */ - public function setDocumentToAdopt(bool $documentToAdopt) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setDocumentToAdopt(bool $documentToAdopt) : static { $this->documentToAdopt = $documentToAdopt; return $this; @@ -300,7 +300,7 @@ public function hasDocumentToAdopt() : bool * @param string $decideReference * @return $this */ - public function setDecideReference(string $decideReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setDecideReference(string $decideReference) : static { $this->decideReference = $decideReference; return $this; @@ -323,19 +323,19 @@ public function hasDecideReference() : bool } /** - * @param string $destination + * @param \OpenEuropa\EPoetry\Request\Type\Destination $destination * @return $this */ - public function setDestination(string $destination) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setDestination(\OpenEuropa\EPoetry\Request\Type\Destination $destination) : static { $this->destination = $destination; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Destination|null */ - public function getDestination() : ?string + public function getDestination() : ?\OpenEuropa\EPoetry\Request\Type\Destination { return $this->destination; } @@ -349,19 +349,19 @@ public function hasDestination() : bool } /** - * @param string $procedure + * @param \OpenEuropa\EPoetry\Request\Type\Procedure $procedure * @return $this */ - public function setProcedure(string $procedure) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setProcedure(\OpenEuropa\EPoetry\Request\Type\Procedure $procedure) : static { $this->procedure = $procedure; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Procedure|null */ - public function getProcedure() : ?string + public function getProcedure() : ?\OpenEuropa\EPoetry\Request\Type\Procedure { return $this->procedure; } @@ -375,19 +375,19 @@ public function hasProcedure() : bool } /** - * @param string $slaAnnex + * @param \OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex * @return $this */ - public function setSlaAnnex(string $slaAnnex) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setSlaAnnex(\OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex) : static { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\SlaAnnex|null */ - public function getSlaAnnex() : ?string + public function getSlaAnnex() : ?\OpenEuropa\EPoetry\Request\Type\SlaAnnex { return $this->slaAnnex; } @@ -404,7 +404,7 @@ public function hasSlaAnnex() : bool * @param string $slaCommitment * @return $this */ - public function setSlaCommitment(string $slaCommitment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setSlaCommitment(string $slaCommitment) : static { $this->slaCommitment = $slaCommitment; return $this; @@ -430,7 +430,7 @@ public function hasSlaCommitment() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -456,7 +456,7 @@ public function hasComment() : bool * @param string $onBehalfOf * @return $this */ - public function setOnBehalfOf(string $onBehalfOf) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setOnBehalfOf(string $onBehalfOf) : static { $this->onBehalfOf = $onBehalfOf; return $this; @@ -479,19 +479,19 @@ public function hasOnBehalfOf() : bool } /** - * @param string $accessibleTo + * @param \OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo * @return $this */ - public function setAccessibleTo(string $accessibleTo) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setAccessibleTo(\OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo) : static { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\AccessLevel|null */ - public function getAccessibleTo() : ?string + public function getAccessibleTo() : ?\OpenEuropa\EPoetry\Request\Type\AccessLevel { return $this->accessibleTo; } @@ -508,7 +508,7 @@ public function hasAccessibleTo() : bool * @param string $keyword1 * @return $this */ - public function setKeyword1(string $keyword1) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setKeyword1(string $keyword1) : static { $this->keyword1 = $keyword1; return $this; @@ -534,7 +534,7 @@ public function hasKeyword1() : bool * @param string $keyword2 * @return $this */ - public function setKeyword2(string $keyword2) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setKeyword2(string $keyword2) : static { $this->keyword2 = $keyword2; return $this; @@ -560,7 +560,7 @@ public function hasKeyword2() : bool * @param string $keyword3 * @return $this */ - public function setKeyword3(string $keyword3) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setKeyword3(string $keyword3) : static { $this->keyword3 = $keyword3; return $this; @@ -586,7 +586,7 @@ public function hasKeyword3() : bool * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static { $this->contacts = $contacts; return $this; @@ -612,7 +612,7 @@ public function hasContacts() : bool * @param \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument * @return $this */ - public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument) : static { $this->originalDocument = $originalDocument; return $this; @@ -638,7 +638,7 @@ public function hasOriginalDocument() : bool * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static { $this->products = $products; return $this; @@ -664,7 +664,7 @@ public function hasProducts() : bool * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; diff --git a/src/Request/Type/RequestDetailsOut.php b/src/Request/Type/RequestDetailsOut.php index ef459626..2ad20ecc 100644 --- a/src/Request/Type/RequestDetailsOut.php +++ b/src/Request/Type/RequestDetailsOut.php @@ -10,7 +10,7 @@ class RequestDetailsOut private $title; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\WorkflowCode */ private $workflowCode; @@ -50,17 +50,17 @@ class RequestDetailsOut private $decideReference; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Destination */ private $destination; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Procedure */ private $procedure; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\SlaAnnex */ private $slaAnnex; @@ -80,7 +80,7 @@ class RequestDetailsOut private $onBehalfOf; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\AccessLevel */ private $accessibleTo; @@ -100,7 +100,7 @@ class RequestDetailsOut private $keyword3; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\RequestStatus */ private $status; @@ -138,7 +138,7 @@ class RequestDetailsOut * @param string $title * @return $this */ - public function setTitle(string $title) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setTitle(string $title) : static { $this->title = $title; return $this; @@ -161,19 +161,19 @@ public function hasTitle() : bool } /** - * @param string $workflowCode + * @param \OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode * @return $this */ - public function setWorkflowCode(string $workflowCode) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setWorkflowCode(\OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode) : static { $this->workflowCode = $workflowCode; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\WorkflowCode|null */ - public function getWorkflowCode() : ?string + public function getWorkflowCode() : ?\OpenEuropa\EPoetry\Request\Type\WorkflowCode { return $this->workflowCode; } @@ -190,7 +190,7 @@ public function hasWorkflowCode() : bool * @param string $internalReference * @return $this */ - public function setInternalReference(string $internalReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setInternalReference(string $internalReference) : static { $this->internalReference = $internalReference; return $this; @@ -216,7 +216,7 @@ public function hasInternalReference() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; @@ -242,7 +242,7 @@ public function hasRequestedDeadline() : bool * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; @@ -268,7 +268,7 @@ public function hasAcceptedDeadline() : bool * @param bool $sensitive * @return $this */ - public function setSensitive(bool $sensitive) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setSensitive(bool $sensitive) : static { $this->sensitive = $sensitive; return $this; @@ -294,7 +294,7 @@ public function hasSensitive() : bool * @param bool $sentViaRue * @return $this */ - public function setSentViaRue(bool $sentViaRue) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setSentViaRue(bool $sentViaRue) : static { $this->sentViaRue = $sentViaRue; return $this; @@ -320,7 +320,7 @@ public function hasSentViaRue() : bool * @param bool $documentToAdopt * @return $this */ - public function setDocumentToAdopt(bool $documentToAdopt) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setDocumentToAdopt(bool $documentToAdopt) : static { $this->documentToAdopt = $documentToAdopt; return $this; @@ -346,7 +346,7 @@ public function hasDocumentToAdopt() : bool * @param string $decideReference * @return $this */ - public function setDecideReference(string $decideReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setDecideReference(string $decideReference) : static { $this->decideReference = $decideReference; return $this; @@ -369,19 +369,19 @@ public function hasDecideReference() : bool } /** - * @param string $destination + * @param \OpenEuropa\EPoetry\Request\Type\Destination $destination * @return $this */ - public function setDestination(string $destination) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setDestination(\OpenEuropa\EPoetry\Request\Type\Destination $destination) : static { $this->destination = $destination; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Destination|null */ - public function getDestination() : ?string + public function getDestination() : ?\OpenEuropa\EPoetry\Request\Type\Destination { return $this->destination; } @@ -395,19 +395,19 @@ public function hasDestination() : bool } /** - * @param string $procedure + * @param \OpenEuropa\EPoetry\Request\Type\Procedure $procedure * @return $this */ - public function setProcedure(string $procedure) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setProcedure(\OpenEuropa\EPoetry\Request\Type\Procedure $procedure) : static { $this->procedure = $procedure; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Procedure|null */ - public function getProcedure() : ?string + public function getProcedure() : ?\OpenEuropa\EPoetry\Request\Type\Procedure { return $this->procedure; } @@ -421,19 +421,19 @@ public function hasProcedure() : bool } /** - * @param string $slaAnnex + * @param \OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex * @return $this */ - public function setSlaAnnex(string $slaAnnex) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setSlaAnnex(\OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex) : static { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\SlaAnnex|null */ - public function getSlaAnnex() : ?string + public function getSlaAnnex() : ?\OpenEuropa\EPoetry\Request\Type\SlaAnnex { return $this->slaAnnex; } @@ -450,7 +450,7 @@ public function hasSlaAnnex() : bool * @param string $slaCommitment * @return $this */ - public function setSlaCommitment(string $slaCommitment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setSlaCommitment(string $slaCommitment) : static { $this->slaCommitment = $slaCommitment; return $this; @@ -476,7 +476,7 @@ public function hasSlaCommitment() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -502,7 +502,7 @@ public function hasComment() : bool * @param string $onBehalfOf * @return $this */ - public function setOnBehalfOf(string $onBehalfOf) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setOnBehalfOf(string $onBehalfOf) : static { $this->onBehalfOf = $onBehalfOf; return $this; @@ -525,19 +525,19 @@ public function hasOnBehalfOf() : bool } /** - * @param string $accessibleTo + * @param \OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo * @return $this */ - public function setAccessibleTo(string $accessibleTo) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setAccessibleTo(\OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo) : static { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\AccessLevel|null */ - public function getAccessibleTo() : ?string + public function getAccessibleTo() : ?\OpenEuropa\EPoetry\Request\Type\AccessLevel { return $this->accessibleTo; } @@ -554,7 +554,7 @@ public function hasAccessibleTo() : bool * @param string $keyword1 * @return $this */ - public function setKeyword1(string $keyword1) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setKeyword1(string $keyword1) : static { $this->keyword1 = $keyword1; return $this; @@ -580,7 +580,7 @@ public function hasKeyword1() : bool * @param string $keyword2 * @return $this */ - public function setKeyword2(string $keyword2) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setKeyword2(string $keyword2) : static { $this->keyword2 = $keyword2; return $this; @@ -606,7 +606,7 @@ public function hasKeyword2() : bool * @param string $keyword3 * @return $this */ - public function setKeyword3(string $keyword3) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setKeyword3(string $keyword3) : static { $this->keyword3 = $keyword3; return $this; @@ -629,19 +629,19 @@ public function hasKeyword3() : bool } /** - * @param string $status + * @param \OpenEuropa\EPoetry\Request\Type\RequestStatus $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setStatus(\OpenEuropa\EPoetry\Request\Type\RequestStatus $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\RequestStatus|null */ - public function getStatus() : ?string + public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\RequestStatus { return $this->status; } @@ -658,7 +658,7 @@ public function hasStatus() : bool * @param string $rejectMessage * @return $this */ - public function setRejectMessage(string $rejectMessage) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setRejectMessage(string $rejectMessage) : static { $this->rejectMessage = $rejectMessage; return $this; @@ -684,7 +684,7 @@ public function hasRejectMessage() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; @@ -710,7 +710,7 @@ public function hasApplicationName() : bool * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static { $this->contacts = $contacts; return $this; @@ -736,7 +736,7 @@ public function hasContacts() : bool * @param \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument * @return $this */ - public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : static { $this->originalDocument = $originalDocument; return $this; @@ -762,7 +762,7 @@ public function hasOriginalDocument() : bool * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static { $this->products = $products; return $this; @@ -788,7 +788,7 @@ public function hasProducts() : bool * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; diff --git a/src/Request/Type/RequestReferenceIn.php b/src/Request/Type/RequestReferenceIn.php index 598be647..4e31b953 100644 --- a/src/Request/Type/RequestReferenceIn.php +++ b/src/Request/Type/RequestReferenceIn.php @@ -23,7 +23,7 @@ class RequestReferenceIn * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; @@ -49,7 +49,7 @@ public function hasDossier() : bool * @param string $productType * @return $this */ - public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + public function setProductType(string $productType) : static { $this->productType = $productType; return $this; @@ -75,7 +75,7 @@ public function hasProductType() : bool * @param int $part * @return $this */ - public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + public function setPart(int $part) : static { $this->part = $part; return $this; diff --git a/src/Request/Type/RequestReferenceOut.php b/src/Request/Type/RequestReferenceOut.php index 09db56f5..4aa90df8 100644 --- a/src/Request/Type/RequestReferenceOut.php +++ b/src/Request/Type/RequestReferenceOut.php @@ -10,7 +10,7 @@ class RequestReferenceOut private $dossier; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\ProductServiceType */ private $productType; @@ -28,7 +28,7 @@ class RequestReferenceOut * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; @@ -51,19 +51,19 @@ public function hasDossier() : bool } /** - * @param string $productType + * @param \OpenEuropa\EPoetry\Request\Type\ProductServiceType $productType * @return $this */ - public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + public function setProductType(\OpenEuropa\EPoetry\Request\Type\ProductServiceType $productType) : static { $this->productType = $productType; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\ProductServiceType|null */ - public function getProductType() : ?string + public function getProductType() : ?\OpenEuropa\EPoetry\Request\Type\ProductServiceType { return $this->productType; } @@ -80,7 +80,7 @@ public function hasProductType() : bool * @param int $part * @return $this */ - public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + public function setPart(int $part) : static { $this->part = $part; return $this; @@ -106,7 +106,7 @@ public function hasPart() : bool * @param int $version * @return $this */ - public function setVersion(int $version) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + public function setVersion(int $version) : static { $this->version = $version; return $this; diff --git a/src/Request/Type/ResubmitRequest.php b/src/Request/Type/ResubmitRequest.php index 3f751550..4aa36a63 100644 --- a/src/Request/Type/ResubmitRequest.php +++ b/src/Request/Type/ResubmitRequest.php @@ -25,7 +25,7 @@ class ResubmitRequest implements RequestInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest * @return $this */ - public function setResubmitRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest + public function setResubmitRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : static { $this->resubmitRequest = $resubmitRequest; return $this; @@ -51,7 +51,7 @@ public function hasResubmitRequest() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; @@ -77,7 +77,7 @@ public function hasApplicationName() : bool * @param string $templateName * @return $this */ - public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest + public function setTemplateName(string $templateName) : static { $this->templateName = $templateName; return $this; diff --git a/src/Request/Type/ResubmitRequestResponse.php b/src/Request/Type/ResubmitRequestResponse.php index 13e4084d..5625d457 100644 --- a/src/Request/Type/ResubmitRequestResponse.php +++ b/src/Request/Type/ResubmitRequestResponse.php @@ -15,7 +15,7 @@ class ResubmitRequestResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; diff --git a/src/Request/Type/SrcDocumentIn.php b/src/Request/Type/SrcDocumentIn.php index f807bdae..3de52aa2 100644 --- a/src/Request/Type/SrcDocumentIn.php +++ b/src/Request/Type/SrcDocumentIn.php @@ -15,7 +15,7 @@ class SrcDocumentIn private $comment; /** - * @var string + * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary */ private $content; @@ -23,7 +23,7 @@ class SrcDocumentIn * @param string $fileName * @return $this */ - public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + public function setFileName(string $fileName) : static { $this->fileName = $fileName; return $this; @@ -49,7 +49,7 @@ public function hasFileName() : bool * @param string $comment * @return $this */ - public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + public function setComment(string $comment) : static { $this->comment = $comment; return $this; @@ -72,19 +72,19 @@ public function hasComment() : bool } /** - * @param string $content + * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content * @return $this */ - public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static { $this->content = $content; return $this; } /** - * @return string|null + * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null */ - public function getContent() : ?string + public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary { return $this->content; } diff --git a/src/Request/Type/TraxDocuments.php b/src/Request/Type/TraxDocuments.php index a70a5eb8..fdf90142 100644 --- a/src/Request/Type/TraxDocuments.php +++ b/src/Request/Type/TraxDocuments.php @@ -13,7 +13,7 @@ class TraxDocuments * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\TraxDocuments + public function setDocument(array $document) : static { $this->document = $document; return $this; diff --git a/src/Request/Type/UnsupportedEncodingException.php b/src/Request/Type/UnsupportedEncodingException.php index e5ecb4e9..db181edb 100644 --- a/src/Request/Type/UnsupportedEncodingException.php +++ b/src/Request/Type/UnsupportedEncodingException.php @@ -13,7 +13,7 @@ class UnsupportedEncodingException * @param string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\UnsupportedEncodingException + public function setMessage(string $message) : static { $this->message = $message; return $this; diff --git a/src/Request/Type/UpdateCallbackUrl.php b/src/Request/Type/UpdateCallbackUrl.php index 8388fac3..ad0f5e31 100644 --- a/src/Request/Type/UpdateCallbackUrl.php +++ b/src/Request/Type/UpdateCallbackUrl.php @@ -20,7 +20,7 @@ class UpdateCallbackUrl implements RequestInterface * @param string $callbackUrl * @return $this */ - public function setCallbackUrl(string $callbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl + public function setCallbackUrl(string $callbackUrl) : static { $this->callbackUrl = $callbackUrl; return $this; @@ -46,7 +46,7 @@ public function hasCallbackUrl() : bool * @param string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl + public function setApplicationName(string $applicationName) : static { $this->applicationName = $applicationName; return $this; diff --git a/src/Request/Type/UpdateCallbackUrlOut.php b/src/Request/Type/UpdateCallbackUrlOut.php index 4c7cf9db..53ab00cd 100644 --- a/src/Request/Type/UpdateCallbackUrlOut.php +++ b/src/Request/Type/UpdateCallbackUrlOut.php @@ -33,7 +33,7 @@ class UpdateCallbackUrlOut * @param bool $success * @return $this */ - public function setSuccess(bool $success) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + public function setSuccess(bool $success) : static { $this->success = $success; return $this; @@ -59,7 +59,7 @@ public function hasSuccess() : bool * @param string $oldCallbackUrl * @return $this */ - public function setOldCallbackUrl(string $oldCallbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + public function setOldCallbackUrl(string $oldCallbackUrl) : static { $this->oldCallbackUrl = $oldCallbackUrl; return $this; @@ -85,7 +85,7 @@ public function hasOldCallbackUrl() : bool * @param string $newCallbackUrl * @return $this */ - public function setNewCallbackUrl(string $newCallbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + public function setNewCallbackUrl(string $newCallbackUrl) : static { $this->newCallbackUrl = $newCallbackUrl; return $this; @@ -111,7 +111,7 @@ public function hasNewCallbackUrl() : bool * @param string $application * @return $this */ - public function setApplication(string $application) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + public function setApplication(string $application) : static { $this->application = $application; return $this; @@ -137,7 +137,7 @@ public function hasApplication() : bool * @param string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + public function setMessage(string $message) : static { $this->message = $message; return $this; diff --git a/src/Request/Type/UpdateCallbackUrlResponse.php b/src/Request/Type/UpdateCallbackUrlResponse.php index b984ac67..1fa69cb1 100644 --- a/src/Request/Type/UpdateCallbackUrlResponse.php +++ b/src/Request/Type/UpdateCallbackUrlResponse.php @@ -15,7 +15,7 @@ class UpdateCallbackUrlResponse implements ResultInterface * @param \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse + public function setReturn(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : static { $this->return = $return; return $this; diff --git a/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php b/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php index a6eb33c2..65009e1d 100644 --- a/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php @@ -6,6 +6,8 @@ use OpenEuropa\EPoetry\CodeGenerator\Assembler\ArrayGetterAssembler; use OpenEuropa\EPoetry\CodeGenerator\Assembler\ArrayGetterAssemblerOptions; +use OpenEuropa\EPoetry\CodeGenerator\Assembler\NullableGetterAssembler; +use OpenEuropa\EPoetry\CodeGenerator\Assembler\NullableGetterAssemblerOptions; use Phpro\SoapClient\CodeGenerator\Assembler\GetterAssembler; use Phpro\SoapClient\CodeGenerator\Assembler\GetterAssemblerOptions; use Phpro\SoapClient\CodeGenerator\Context\ContextInterface; @@ -62,7 +64,7 @@ public function getProp1() : ?array */ protected function assemble(ContextInterface $context) { - $originalAssembler = new GetterAssembler((new GetterAssemblerOptions()) + $originalAssembler = new NullableGetterAssembler(NullableGetterAssemblerOptions::create() ->withReturnType() ->withReturnNull()); $originalAssembler->assemble($context); From 85a46a9598b78f06526c5c60dd31637cc19f4c15 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Tue, 21 Jan 2025 10:11:24 +0100 Subject: [PATCH 03/14] EWPP-4991: Patch normalizer and re-run export. --- composer.json | 9 ++++++++- config/soap-client-authentication.php | 7 +++++++ patches/add-anyuri-to-normalizer.patch | 12 ++++++++++++ .../ClientCertificateClassmap.php | 1 + .../ClientCertificateClient.php | 1 + .../ClientCertificate/Type/GetServiceTicket.php | 16 ++++++++-------- src/Notification/NotificationClassmap.php | 1 + src/Request/RequestClassmap.php | 1 + src/Request/RequestClient.php | 1 + 9 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 patches/add-anyuri-to-normalizer.patch diff --git a/composer.json b/composer.json index 307effc1..7d6fe46f 100644 --- a/composer.json +++ b/composer.json @@ -69,5 +69,12 @@ }, "bin": ["bin/epoetry"], "minimum-stability": "dev", - "prefer-stable": true + "prefer-stable": true, + "extra": { + "patches": { + "phpro/soap-client" : { + "add-anyuri-to-normalizer.patch": "./patches/add-anyuri-to-normalizer.patch" + } + } + } } diff --git a/config/soap-client-authentication.php b/config/soap-client-authentication.php index ba6e9c34..c3e2dbf8 100644 --- a/config/soap-client-authentication.php +++ b/config/soap-client-authentication.php @@ -5,6 +5,7 @@ use Phpro\SoapClient\CodeGenerator\Config\Config; use Soap\ExtSoapEngine\ExtSoapOptions; use Phpro\SoapClient\Soap\DefaultEngineFactory; +use OpenEuropa\EPoetry\CodeGenerator as OpenEuropa; // Generate SOAP client library to perform ECAS client certificate login. // @link https://citnet.tech.ec.europa.eu/CITnet/confluence/display/IAM/ECAS+Certificate+Login @@ -24,6 +25,12 @@ ->setClassMapDestination('src/Authentication/ClientCertificate') ->setClassMapName('ClientCertificateClassmap') ->setClassMapNamespace('OpenEuropa\EPoetry\Authentication\ClientCertificate') + ->addRule(new Rules\AssembleRule( + new OpenEuropa\Assembler\OverridePropertyTypeAssembler( + (new OpenEuropa\Assembler\OverridePropertyTypeAssemblerOptions()) + ->setPropertyTypeMapping([]) + ) + )) ->addRule(new Rules\AssembleRule(new Assembler\GetterAssembler(new Assembler\GetterAssemblerOptions()))) ->addRule(new Rules\AssembleRule(new Assembler\ImmutableSetterAssembler( new Assembler\ImmutableSetterAssemblerOptions() diff --git a/patches/add-anyuri-to-normalizer.patch b/patches/add-anyuri-to-normalizer.patch new file mode 100644 index 00000000..e6e08796 --- /dev/null +++ b/patches/add-anyuri-to-normalizer.patch @@ -0,0 +1,12 @@ +diff --git a/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php b/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php +index 0f33a7f..76bcea5 100644 +--- a/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php ++++ b/src/Phpro/SoapClient/CodeGenerator/Util/Normalizer.php +@@ -15,6 +15,7 @@ class Normalizer + 'any' => 'mixed', + 'anytype' => 'mixed', + 'anyxml' => 'string', ++ 'anyuri' => 'string', + 'anysimpletype' => 'mixed', + 'long' => 'int', + 'short' => 'int', diff --git a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php index 3a6a3bdf..f3c966f7 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php @@ -16,3 +16,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } + diff --git a/src/Authentication/ClientCertificate/ClientCertificateClient.php b/src/Authentication/ClientCertificate/ClientCertificateClient.php index d62061a2..57091ed6 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClient.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClient.php @@ -35,3 +35,4 @@ public function getServiceTicket(\OpenEuropa\EPoetry\Authentication\ClientCertif return $response; } } + diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php index 69118be9..e69b932c 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php @@ -7,33 +7,33 @@ class GetServiceTicket implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI + * @var string */ - private \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service; + private string $service; /** * Constructor * - * @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service + * @param string $service */ - public function __construct(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service) + public function __construct(string $service) { $this->service = $service; } /** - * @return \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI + * @return string */ - public function getService() : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI + public function getService() : string { return $this->service; } /** - * @param \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service + * @param string $service * @return static */ - public function withService(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\AnyURI $service) : static + public function withService(string $service) : static { $new = clone $this; $new->service = $service; diff --git a/src/Notification/NotificationClassmap.php b/src/Notification/NotificationClassmap.php index 84b736e9..86380f6d 100644 --- a/src/Notification/NotificationClassmap.php +++ b/src/Notification/NotificationClassmap.php @@ -22,3 +22,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } + diff --git a/src/Request/RequestClassmap.php b/src/Request/RequestClassmap.php index b6495fc8..e015b5b4 100644 --- a/src/Request/RequestClassmap.php +++ b/src/Request/RequestClassmap.php @@ -69,3 +69,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } + diff --git a/src/Request/RequestClient.php b/src/Request/RequestClient.php index a655f7e4..58636f26 100644 --- a/src/Request/RequestClient.php +++ b/src/Request/RequestClient.php @@ -140,3 +140,4 @@ public function createCorrectionRequest(\OpenEuropa\EPoetry\Request\Type\CreateC return $response; } } + From c059f1e7ddd73cf422f2ee47bbf65c488948a803 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Tue, 21 Jan 2025 12:42:48 +0100 Subject: [PATCH 04/14] EWPP-4991: Use CodeGeneratorEngineFactory. --- config/soap-client-authentication.php | 16 +- config/soap-client-notification.php | 12 +- config/soap-client-request.php | 9 +- .../Type/GetServiceTicket.php | 3 + .../Type/GetServiceTicketResponse.php | 2 + .../Assembler/NullableGetterAssembler.php | 108 -------- .../NullableGetterAssemblerOptions.php | 142 ---------- src/CodeGenerator/ConfigProcessor.php | 5 +- src/Notification/Type/DgtNotification.php | 62 ++--- .../Type/DgtNotificationResult.php | 14 +- src/Notification/Type/LinguisticRequest.php | 22 +- src/Notification/Type/Product.php | 66 ++--- src/Notification/Type/ProductReference.php | 20 +- src/Notification/Type/ReceiveNotification.php | 10 +- .../Type/ReceiveNotificationResponse.php | 10 +- src/Notification/Type/RequestReference.php | 36 +-- src/Request/RequestClassmap.php | 9 + src/Request/Type/AddNewPartToDossier.php | 40 +-- .../Type/AddNewPartToDossierResponse.php | 10 +- src/Request/Type/AuxiliaryDocumentOut.php | 56 ++-- src/Request/Type/AuxiliaryDocuments.php | 8 +- src/Request/Type/AuxiliaryDocumentsIn.php | 50 ++-- src/Request/Type/ContactPerson.php | 162 +++++++++++ src/Request/Type/ContactPersonIn.php | 18 +- src/Request/Type/ContactPersonOut.php | 64 ++--- src/Request/Type/Contacts.php | 8 +- src/Request/Type/CorrectionDetailsIn.php | 66 ++--- src/Request/Type/CorrectionReferenceIn.php | 10 +- src/Request/Type/CorrectionRequestOut.php | 20 +- src/Request/Type/CreateCorrectionRequest.php | 20 +- .../Type/CreateCorrectionRequestResponse.php | 10 +- src/Request/Type/CreateLinguisticRequest.php | 30 +-- .../Type/CreateLinguisticRequestResponse.php | 10 +- src/Request/Type/CreateNewVersion.php | 20 +- src/Request/Type/CreateNewVersionResponse.php | 10 +- src/Request/Type/DCO.php | 224 +++++++++++++++ src/Request/Type/DcoOut.php | 76 +++--- src/Request/Type/DocumentIn.php | 42 +-- src/Request/Type/Dossier.php | 100 +++++++ src/Request/Type/DossierReference.php | 30 +-- src/Request/Type/GetLinguisticRequest.php | 20 +- .../Type/GetLinguisticRequestResponse.php | 10 +- src/Request/Type/InformativeMessages.php | 6 +- src/Request/Type/LinguisticRequestIn.php | 20 +- src/Request/Type/LinguisticRequestOut.php | 30 +-- src/Request/Type/LinguisticSection.php | 38 +++ src/Request/Type/LinguisticSectionIn.php | 14 +- src/Request/Type/LinguisticSectionOut.php | 16 +- src/Request/Type/LinguisticSections.php | 8 +- src/Request/Type/LinquisticRequest.php | 100 +++++++ .../Type/ModifyAuxiliaryDocumentsIn.php | 40 +-- src/Request/Type/ModifyLinguisticRequest.php | 20 +- .../Type/ModifyLinguisticRequestIn.php | 20 +- .../Type/ModifyLinguisticRequestResponse.php | 10 +- src/Request/Type/ModifyProductRequestIn.php | 18 +- src/Request/Type/ModifyRequestDetailsIn.php | 24 +- src/Request/Type/ModifyRequestReferenceIn.php | 30 +-- src/Request/Type/NoSuchMethodException.php | 10 +- src/Request/Type/OriginalDocument.php | 193 +++++++++++++ src/Request/Type/OriginalDocumentIn.php | 40 +-- src/Request/Type/OriginalDocumentOut.php | 56 ++-- src/Request/Type/Product.php | 100 +++++++ src/Request/Type/ProductRequestIn.php | 24 +- src/Request/Type/ProductRequestOut.php | 60 ++--- src/Request/Type/Products.php | 8 +- src/Request/Type/PrtDocuments.php | 6 +- src/Request/Type/ReferenceDocuments.php | 6 +- src/Request/Type/RequestDetails.php | 100 +++++++ src/Request/Type/RequestDetailsIn.php | 206 +++++++------- src/Request/Type/RequestDetailsOut.php | 254 +++++++++--------- src/Request/Type/RequestReference.php | 100 +++++++ src/Request/Type/RequestReferenceIn.php | 30 +-- src/Request/Type/RequestReferenceOut.php | 42 +-- src/Request/Type/ResubmitRequest.php | 30 +-- src/Request/Type/ResubmitRequestResponse.php | 10 +- src/Request/Type/SrcDocumentIn.php | 32 +-- src/Request/Type/TraxDocuments.php | 6 +- .../Type/UnsupportedEncodingException.php | 10 +- src/Request/Type/UpdateCallbackUrl.php | 20 +- src/Request/Type/UpdateCallbackUrlOut.php | 44 +-- .../Type/UpdateCallbackUrlResponse.php | 10 +- 81 files changed, 2162 insertions(+), 1289 deletions(-) delete mode 100644 src/CodeGenerator/Assembler/NullableGetterAssembler.php delete mode 100644 src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php create mode 100644 src/Request/Type/ContactPerson.php create mode 100644 src/Request/Type/DCO.php create mode 100644 src/Request/Type/Dossier.php create mode 100644 src/Request/Type/LinguisticSection.php create mode 100644 src/Request/Type/LinquisticRequest.php create mode 100644 src/Request/Type/OriginalDocument.php create mode 100644 src/Request/Type/Product.php create mode 100644 src/Request/Type/RequestDetails.php create mode 100644 src/Request/Type/RequestReference.php diff --git a/config/soap-client-authentication.php b/config/soap-client-authentication.php index c3e2dbf8..e115fd82 100644 --- a/config/soap-client-authentication.php +++ b/config/soap-client-authentication.php @@ -3,20 +3,16 @@ use Phpro\SoapClient\CodeGenerator\Assembler; use Phpro\SoapClient\CodeGenerator\Rules; use Phpro\SoapClient\CodeGenerator\Config\Config; -use Soap\ExtSoapEngine\ExtSoapOptions; -use Phpro\SoapClient\Soap\DefaultEngineFactory; -use OpenEuropa\EPoetry\CodeGenerator as OpenEuropa; +use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory; // Generate SOAP client library to perform ECAS client certificate login. // @link https://citnet.tech.ec.europa.eu/CITnet/confluence/display/IAM/ECAS+Certificate+Login // WSDL used for generating the SOAP codebase can be found here: // @link https://webgate.ec.europa.eu/cas/ws/CertLoginService.wsdl // The content returned by the URL above is stored locally in resources/authentication.wsdl. +$engine = CodeGeneratorEngineFactory::create('./resources/authentication.wsdl'); return Config::create() - ->setEngine($engine = DefaultEngineFactory::create( - ExtSoapOptions::defaults(__DIR__.'/../resources/authentication.wsdl', []) - ->disableWsdlCache() - )) + ->setEngine($engine) ->setTypeDestination('src/Authentication/ClientCertificate/Type') ->setTypeNamespace('OpenEuropa\EPoetry\Authentication\ClientCertificate\Type') ->setClientDestination('src/Authentication/ClientCertificate') @@ -25,12 +21,6 @@ ->setClassMapDestination('src/Authentication/ClientCertificate') ->setClassMapName('ClientCertificateClassmap') ->setClassMapNamespace('OpenEuropa\EPoetry\Authentication\ClientCertificate') - ->addRule(new Rules\AssembleRule( - new OpenEuropa\Assembler\OverridePropertyTypeAssembler( - (new OpenEuropa\Assembler\OverridePropertyTypeAssemblerOptions()) - ->setPropertyTypeMapping([]) - ) - )) ->addRule(new Rules\AssembleRule(new Assembler\GetterAssembler(new Assembler\GetterAssemblerOptions()))) ->addRule(new Rules\AssembleRule(new Assembler\ImmutableSetterAssembler( new Assembler\ImmutableSetterAssemblerOptions() diff --git a/config/soap-client-notification.php b/config/soap-client-notification.php index 8b3a75b8..fa2bc451 100644 --- a/config/soap-client-notification.php +++ b/config/soap-client-notification.php @@ -2,20 +2,18 @@ use OpenEuropa\EPoetry\CodeGenerator\ConfigProcessor; use Phpro\SoapClient\CodeGenerator\Config\Config; -use Soap\ExtSoapEngine\ExtSoapOptions; -use Phpro\SoapClient\Soap\DefaultEngineFactory; +use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory; +$engine = CodeGeneratorEngineFactory::create('./resources/notification.wsdl'); $config = Config::create() - ->setEngine($engine = DefaultEngineFactory::create( - ExtSoapOptions::defaults('./resources/notification.wsdl', []) - ->disableWsdlCache() - )) + ->setEngine($engine) ->setTypeDestination('src/Notification/Type') ->setTypeNamespace('OpenEuropa\EPoetry\Notification\Type') ->setClientDestination('src/Notification/') ->setClientNamespace('OpenEuropa\EPoetry\Notification') ->setClassMapDestination('src/Notification/') ->setClassMapName('NotificationClassmap') - ->setClassMapNamespace('OpenEuropa\EPoetry\Notification'); + ->setClassMapNamespace('OpenEuropa\EPoetry\Notification') +; return ConfigProcessor::addRules($config); diff --git a/config/soap-client-request.php b/config/soap-client-request.php index 30dd8c69..5297132d 100644 --- a/config/soap-client-request.php +++ b/config/soap-client-request.php @@ -2,14 +2,11 @@ use OpenEuropa\EPoetry\CodeGenerator\ConfigProcessor; use Phpro\SoapClient\CodeGenerator\Config\Config; -use Soap\ExtSoapEngine\ExtSoapOptions; -use Phpro\SoapClient\Soap\DefaultEngineFactory; +use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory; +$engine = CodeGeneratorEngineFactory::create('./resources/request.wsdl'); $config = Config::create() - ->setEngine($engine = DefaultEngineFactory::create( - ExtSoapOptions::defaults('./resources/request.wsdl', []) - ->disableWsdlCache() - )) + ->setEngine($engine) ->setTypeDestination('src/Request/Type') ->setTypeNamespace('OpenEuropa\EPoetry\Request\Type') ->setClientDestination('src/Request/') diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php index e69b932c..3e67a8a3 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php @@ -7,6 +7,9 @@ class GetServiceTicket implements RequestInterface { /** + * The target service for which you want to obtain a service ticket. + * This must be a valid URL. + * * @var string */ private string $service; diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php index f2ba019d..f47cbab7 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php @@ -7,6 +7,8 @@ class GetServiceTicketResponse implements ResultInterface { /** + * Service ticket for the specified service. + * * @var string */ private string $serviceTicket; diff --git a/src/CodeGenerator/Assembler/NullableGetterAssembler.php b/src/CodeGenerator/Assembler/NullableGetterAssembler.php deleted file mode 100644 index 063efa1a..00000000 --- a/src/CodeGenerator/Assembler/NullableGetterAssembler.php +++ /dev/null @@ -1,108 +0,0 @@ -options = $options ?? new NullableGetterAssemblerOptions(); - } - - /** - * {@inheritdoc} - */ - public function canAssemble(ContextInterface $context): bool - { - return $context instanceof PropertyContext; - } - - /** - * @param ContextInterface|PropertyContext $context - * - * @throws AssemblerException - */ - public function assemble(ContextInterface $context) - { - $class = $context->getClass(); - $property = $context->getProperty(); - - // Property might be forced to be nullable by the code generator. - if ($this->options->useOptionalValue()) { - $property = $property->withMeta(fn(TypeMeta $meta): TypeMeta => $meta->withIsNullable(true)); - } - - try { - $prefix = $this->getPrefix($property); - $methodName = Normalizer::generatePropertyMethod($prefix, $property->getName()); - $class->removeMethod($methodName); - - $methodGenerator = new MethodGenerator($methodName); - $methodGenerator->setVisibility(MethodGenerator::VISIBILITY_PUBLIC); - $methodGenerator->setBody(sprintf('return $this->%s;', $property->getName())); - - if ($this->options->useReturnType()) { - $returnType = $this->options->useReturnNull() ? '?' . $property->getPhpType() : $property->getPhpType(); - $methodGenerator->setReturnType($returnType); - } - - if ($this->options->useDocBlocks()) { - $propertyType = $this->options->useReturnNull() ? $property->getType() . '|null' : $property->getType(); - $methodGenerator->setDocBlock(DocBlockGeneratorFactory::fromArray([ - 'tags' => [ - [ - 'name' => 'return', - 'description' => $propertyType, - ], - ], - ])); - } - - $class->addMethodFromGenerator($methodGenerator); - } catch (\Exception $e) { - throw AssemblerException::fromException($e); - } - } - - /** - * @param Property $property - * @return non-empty-string - */ - public function getPrefix(Property $property): string - { - if (!$this->options->useBoolGetters()) { - return 'get'; - } - - return $property->getType() === 'bool' ? 'is' : 'get'; - } -} diff --git a/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php b/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php deleted file mode 100644 index a231739c..00000000 --- a/src/CodeGenerator/Assembler/NullableGetterAssemblerOptions.php +++ /dev/null @@ -1,142 +0,0 @@ -boolGetters = $boolGetters; - - return $new; - } - - /** - * @param bool $returnType - * - * @return NullableGetterAssemblerOptions - */ - public function withReturnType(bool $returnType = true): NullableGetterAssemblerOptions - { - $new = clone $this; - $new->returnType = $returnType; - - return $new; - } - - /** - * @return bool - */ - public function useBoolGetters(): bool - { - return $this->boolGetters; - } - - /** - * @return bool - */ - public function useReturnType(): bool - { - return $this->returnType; - } - - /** - * @param bool $withDocBlocks - * - * @return NullableGetterAssemblerOptions - */ - public function withDocBlocks(bool $withDocBlocks = true): NullableGetterAssemblerOptions - { - $new = clone $this; - $new->docBlocks = $withDocBlocks; - - return $new; - } - - /** - * @return bool - */ - public function useDocBlocks(): bool - { - return $this->docBlocks; - } - - public function withOptionalValue(bool $withOptionalValue = true): self - { - $new = clone $this; - $new->optionalValue = $withOptionalValue; - - return $new; - } - - public function useOptionalValue(): bool - { - return $this->optionalValue; - } - - /** - * @param bool $returnNull - * - * @return self - */ - public function withReturnNull(bool $returnNull = true): self - { - $new = clone $this; - $new->returnNull = $returnNull; - - return $new; - } - - /** - * @return bool - */ - public function useReturnNull(): bool - { - return $this->returnNull; - } -} diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 025d1b2b..9401e10a 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -59,11 +59,10 @@ public static function addRules(Config $config, array $specialClassesAndProperti ->whitelist($specialClassesAndProperties) ); - $defaultGetterAssembler = new OpenEuropa\Assembler\NullableGetterAssembler( - OpenEuropa\Assembler\NullableGetterAssemblerOptions::create() + $defaultGetterAssembler = new Assembler\GetterAssembler( + Assembler\GetterAssemblerOptions::create() ->withReturnType() ->withBoolGetters() - ->withReturnNull() ); $arrayGetterAssembler = new OpenEuropa\Assembler\ArrayGetterAssembler( diff --git a/src/Notification/Type/DgtNotification.php b/src/Notification/Type/DgtNotification.php index 46468279..5eac556c 100644 --- a/src/Notification/Type/DgtNotification.php +++ b/src/Notification/Type/DgtNotification.php @@ -5,49 +5,49 @@ class DgtNotification { /** - * @var \OpenEuropa\EPoetry\Notification\Type\NotificationType + * @var null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' */ - private $notificationType; + private $notificationType = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + * @var null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest */ - private $linguisticRequest; + private $linguisticRequest = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\Product + * @var null | \OpenEuropa\EPoetry\Notification\Type\Product */ - private $product; + private $product = null; /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** - * @var string + * @var null | string */ - private $planningAgent; + private $planningAgent = null; /** - * @var string + * @var null | string */ - private $planningSector; + private $planningSector = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\NotificationType $notificationType + * @param null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' $notificationType * @return $this */ - public function setNotificationType(\OpenEuropa\EPoetry\Notification\Type\NotificationType $notificationType) : static + public function setNotificationType(?string $notificationType) : static { $this->notificationType = $notificationType; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\NotificationType|null + * @return null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' */ - public function getNotificationType() : ?\OpenEuropa\EPoetry\Notification\Type\NotificationType + public function getNotificationType() : ?string { return $this->notificationType; } @@ -61,17 +61,17 @@ public function hasNotificationType() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest + * @param null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest * @return $this */ - public function setLinguisticRequest(\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : static + public function setLinguisticRequest(?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : static { $this->linguisticRequest = $linguisticRequest; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest */ public function getLinguisticRequest() : ?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest { @@ -87,17 +87,17 @@ public function hasLinguisticRequest() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\Product $product + * @param null | \OpenEuropa\EPoetry\Notification\Type\Product $product * @return $this */ - public function setProduct(\OpenEuropa\EPoetry\Notification\Type\Product $product) : static + public function setProduct(?\OpenEuropa\EPoetry\Notification\Type\Product $product) : static { $this->product = $product; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\Product|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\Product */ public function getProduct() : ?\OpenEuropa\EPoetry\Notification\Type\Product { @@ -113,17 +113,17 @@ public function hasProduct() : bool } /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : static + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { @@ -139,17 +139,17 @@ public function hasMessage() : bool } /** - * @param string $planningAgent + * @param null | string $planningAgent * @return $this */ - public function setPlanningAgent(string $planningAgent) : static + public function setPlanningAgent(?string $planningAgent) : static { $this->planningAgent = $planningAgent; return $this; } /** - * @return string|null + * @return null | string */ public function getPlanningAgent() : ?string { @@ -165,17 +165,17 @@ public function hasPlanningAgent() : bool } /** - * @param string $planningSector + * @param null | string $planningSector * @return $this */ - public function setPlanningSector(string $planningSector) : static + public function setPlanningSector(?string $planningSector) : static { $this->planningSector = $planningSector; return $this; } /** - * @return string|null + * @return null | string */ public function getPlanningSector() : ?string { diff --git a/src/Notification/Type/DgtNotificationResult.php b/src/Notification/Type/DgtNotificationResult.php index fa0c88f5..cc6fe898 100644 --- a/src/Notification/Type/DgtNotificationResult.php +++ b/src/Notification/Type/DgtNotificationResult.php @@ -10,9 +10,9 @@ class DgtNotificationResult private $success; /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** * @param bool $success @@ -25,9 +25,9 @@ public function setSuccess(bool $success) : static } /** - * @return bool|null + * @return bool */ - public function isSuccess() : ?bool + public function isSuccess() : bool { return $this->success; } @@ -41,17 +41,17 @@ public function hasSuccess() : bool } /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : static + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { diff --git a/src/Notification/Type/LinguisticRequest.php b/src/Notification/Type/LinguisticRequest.php index d2a2d28d..e52bc6f5 100644 --- a/src/Notification/Type/LinguisticRequest.php +++ b/src/Notification/Type/LinguisticRequest.php @@ -5,27 +5,27 @@ class LinguisticRequest { /** - * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference; + private $requestReference = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\RequestStatus + * @var null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' */ - private $status; + private $status = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,19 +41,19 @@ public function hasRequestReference() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\RequestStatus $status + * @param null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' $status * @return $this */ - public function setStatus(\OpenEuropa\EPoetry\Notification\Type\RequestStatus $status) : static + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\RequestStatus|null + * @return null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' */ - public function getStatus() : ?\OpenEuropa\EPoetry\Notification\Type\RequestStatus + public function getStatus() : ?string { return $this->status; } diff --git a/src/Notification/Type/Product.php b/src/Notification/Type/Product.php index 7081623e..7a77329d 100644 --- a/src/Notification/Type/Product.php +++ b/src/Notification/Type/Product.php @@ -5,47 +5,47 @@ class Product { /** - * @var \OpenEuropa\EPoetry\Notification\Type\ProductReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\ProductReference */ - private $productReference; + private $productReference = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\ProductStatus + * @var null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' */ - private $status; + private $status = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $acceptedDeadline; + private $acceptedDeadline = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\Base64Binary + * @var null | mixed */ - private $file; + private $file = null; /** - * @var string + * @var null | string */ - private $name; + private $name = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference * @return $this */ - public function setProductReference(\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : static + public function setProductReference(?\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : static { $this->productReference = $productReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\ProductReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\ProductReference */ public function getProductReference() : ?\OpenEuropa\EPoetry\Notification\Type\ProductReference { @@ -61,19 +61,19 @@ public function hasProductReference() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\ProductStatus $status + * @param null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' $status * @return $this */ - public function setStatus(\OpenEuropa\EPoetry\Notification\Type\ProductStatus $status) : static + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\ProductStatus|null + * @return null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' */ - public function getStatus() : ?\OpenEuropa\EPoetry\Notification\Type\ProductStatus + public function getStatus() : ?string { return $this->status; } @@ -87,17 +87,17 @@ public function hasStatus() : bool } /** - * @param \DateTimeInterface $acceptedDeadline + * @param null | \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -113,19 +113,19 @@ public function hasAcceptedDeadline() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\Base64Binary $file + * @param null | mixed $file * @return $this */ - public function setFile(\OpenEuropa\EPoetry\Notification\Type\Base64Binary $file) : static + public function setFile(mixed $file) : static { $this->file = $file; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\Base64Binary|null + * @return null | mixed */ - public function getFile() : ?\OpenEuropa\EPoetry\Notification\Type\Base64Binary + public function getFile() : mixed { return $this->file; } @@ -139,17 +139,17 @@ public function hasFile() : bool } /** - * @param string $name + * @param null | string $name * @return $this */ - public function setName(string $name) : static + public function setName(?string $name) : static { $this->name = $name; return $this; } /** - * @return string|null + * @return null | string */ public function getName() : ?string { @@ -165,19 +165,19 @@ public function hasName() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Notification\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Notification\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } diff --git a/src/Notification/Type/ProductReference.php b/src/Notification/Type/ProductReference.php index 1720b2b9..b5a74832 100644 --- a/src/Notification/Type/ProductReference.php +++ b/src/Notification/Type/ProductReference.php @@ -5,27 +5,27 @@ class ProductReference { /** - * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference; + private $requestReference = null; /** - * @var string + * @var null | string */ - private $language; + private $language = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param string $language + * @param null | string $language * @return $this */ - public function setLanguage(string $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return null | string */ public function getLanguage() : ?string { diff --git a/src/Notification/Type/ReceiveNotification.php b/src/Notification/Type/ReceiveNotification.php index aee07372..c5ac006f 100644 --- a/src/Notification/Type/ReceiveNotification.php +++ b/src/Notification/Type/ReceiveNotification.php @@ -7,22 +7,22 @@ class ReceiveNotification implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotification + * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification */ - private $notification; + private $notification = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification + * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification * @return $this */ - public function setNotification(\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : static + public function setNotification(?\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : static { $this->notification = $notification; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotification|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification */ public function getNotification() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotification { diff --git a/src/Notification/Type/ReceiveNotificationResponse.php b/src/Notification/Type/ReceiveNotificationResponse.php index 421afcae..e8653448 100644 --- a/src/Notification/Type/ReceiveNotificationResponse.php +++ b/src/Notification/Type/ReceiveNotificationResponse.php @@ -7,22 +7,22 @@ class ReceiveNotificationResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return + * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult */ public function getReturn() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult { diff --git a/src/Notification/Type/RequestReference.php b/src/Notification/Type/RequestReference.php index 095737d2..e7bdb9c0 100644 --- a/src/Notification/Type/RequestReference.php +++ b/src/Notification/Type/RequestReference.php @@ -5,9 +5,9 @@ class RequestReference { /** - * @var string + * @var null | string */ - private $requesterCode; + private $requesterCode = null; /** * @var int @@ -30,22 +30,22 @@ class RequestReference private $version; /** - * @var string + * @var null | string */ - private $productType; + private $productType = null; /** - * @param string $requesterCode + * @param null | string $requesterCode * @return $this */ - public function setRequesterCode(string $requesterCode) : static + public function setRequesterCode(?string $requesterCode) : static { $this->requesterCode = $requesterCode; return $this; } /** - * @return string|null + * @return null | string */ public function getRequesterCode() : ?string { @@ -71,9 +71,9 @@ public function setYear(int $year) : static } /** - * @return int|null + * @return int */ - public function getYear() : ?int + public function getYear() : int { return $this->year; } @@ -97,9 +97,9 @@ public function setNumber(int $number) : static } /** - * @return int|null + * @return int */ - public function getNumber() : ?int + public function getNumber() : int { return $this->number; } @@ -123,9 +123,9 @@ public function setPart(int $part) : static } /** - * @return int|null + * @return int */ - public function getPart() : ?int + public function getPart() : int { return $this->part; } @@ -149,9 +149,9 @@ public function setVersion(int $version) : static } /** - * @return int|null + * @return int */ - public function getVersion() : ?int + public function getVersion() : int { return $this->version; } @@ -165,17 +165,17 @@ public function hasVersion() : bool } /** - * @param string $productType + * @param null | string $productType * @return $this */ - public function setProductType(string $productType) : static + public function setProductType(?string $productType) : static { $this->productType = $productType; return $this; } /** - * @return string|null + * @return null | string */ public function getProductType() : ?string { diff --git a/src/Request/RequestClassmap.php b/src/Request/RequestClassmap.php index e015b5b4..f5b33b23 100644 --- a/src/Request/RequestClassmap.php +++ b/src/Request/RequestClassmap.php @@ -66,6 +66,15 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class new ClassMap('modifyProductRequestIn', Type\ModifyProductRequestIn::class), new ClassMap('modifyAuxiliaryDocumentsIn', Type\ModifyAuxiliaryDocumentsIn::class), new ClassMap('updateCallbackUrlOut', Type\UpdateCallbackUrlOut::class), + new ClassMap('dossier', Type\Dossier::class), + new ClassMap('requestDetails', Type\RequestDetails::class), + new ClassMap('originalDocument', Type\OriginalDocument::class), + new ClassMap('linguisticSection', Type\LinguisticSection::class), + new ClassMap('product', Type\Product::class), + new ClassMap('linquisticRequest', Type\LinquisticRequest::class), + new ClassMap('requestReference', Type\RequestReference::class), + new ClassMap('contactPerson', Type\ContactPerson::class), + new ClassMap('DCO', Type\DCO::class), ); } } diff --git a/src/Request/Type/AddNewPartToDossier.php b/src/Request/Type/AddNewPartToDossier.php index 63a234f2..84a314bb 100644 --- a/src/Request/Type/AddNewPartToDossier.php +++ b/src/Request/Type/AddNewPartToDossier.php @@ -7,37 +7,37 @@ class AddNewPartToDossier implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier; + private $dossier = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails; + private $requestDetails = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @var string + * @var null | string */ - private $templateName; + private $templateName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -53,17 +53,17 @@ public function hasDossier() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { @@ -79,17 +79,17 @@ public function hasRequestDetails() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { @@ -105,17 +105,17 @@ public function hasApplicationName() : bool } /** - * @param string $templateName + * @param null | string $templateName * @return $this */ - public function setTemplateName(string $templateName) : static + public function setTemplateName(?string $templateName) : static { $this->templateName = $templateName; return $this; } /** - * @return string|null + * @return null | string */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/AddNewPartToDossierResponse.php b/src/Request/Type/AddNewPartToDossierResponse.php index 4545df3d..0c078978 100644 --- a/src/Request/Type/AddNewPartToDossierResponse.php +++ b/src/Request/Type/AddNewPartToDossierResponse.php @@ -7,22 +7,22 @@ class AddNewPartToDossierResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/AuxiliaryDocumentOut.php b/src/Request/Type/AuxiliaryDocumentOut.php index aec8f7fc..2490993e 100644 --- a/src/Request/Type/AuxiliaryDocumentOut.php +++ b/src/Request/Type/AuxiliaryDocumentOut.php @@ -5,42 +5,42 @@ class AuxiliaryDocumentOut { /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - private $language; + private $language = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentType + * @var null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' */ - private $documentType; + private $documentType = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -56,19 +56,19 @@ public function hasFileName() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : ?string { return $this->language; } @@ -82,19 +82,19 @@ public function hasLanguage() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentType $documentType + * @param null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' $documentType * @return $this */ - public function setDocumentType(\OpenEuropa\EPoetry\Request\Type\DocumentType $documentType) : static + public function setDocumentType(?string $documentType) : static { $this->documentType = $documentType; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentType|null + * @return null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' */ - public function getDocumentType() : ?\OpenEuropa\EPoetry\Request\Type\DocumentType + public function getDocumentType() : ?string { return $this->documentType; } @@ -108,17 +108,17 @@ public function hasDocumentType() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -134,19 +134,19 @@ public function hasComment() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } diff --git a/src/Request/Type/AuxiliaryDocuments.php b/src/Request/Type/AuxiliaryDocuments.php index 231ac96e..dddbdfe9 100644 --- a/src/Request/Type/AuxiliaryDocuments.php +++ b/src/Request/Type/AuxiliaryDocuments.php @@ -5,12 +5,13 @@ class AuxiliaryDocuments { /** - * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array + * @var array, + * \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array> */ private $document = []; /** - * @param AuxiliaryDocumentOut[] $document + * @param array, AuxiliaryDocumentOut[]> $document * @return $this */ public function setDocument(array $document) : static @@ -20,7 +21,8 @@ public function setDocument(array $document) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array|null + * @return array, + * \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array> */ public function getDocument() : ?array { diff --git a/src/Request/Type/AuxiliaryDocumentsIn.php b/src/Request/Type/AuxiliaryDocumentsIn.php index 6763ae2a..2d8a44d5 100644 --- a/src/Request/Type/AuxiliaryDocumentsIn.php +++ b/src/Request/Type/AuxiliaryDocumentsIn.php @@ -5,42 +5,42 @@ class AuxiliaryDocumentsIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ - private $referenceDocuments; + private $referenceDocuments = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ - private $traxDocuments; + private $traxDocuments = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @var null | \OpenEuropa\EPoetry\Request\Type\DocumentIn */ - private $spotDocument; + private $spotDocument = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ - private $prtDocuments; + private $prtDocuments = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + * @var null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn */ - private $srcDocument; + private $srcDocument = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static + public function setReferenceDocuments(?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static { $this->referenceDocuments = $referenceDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ public function getReferenceDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments { @@ -56,17 +56,17 @@ public function hasReferenceDocuments() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static + public function setTraxDocuments(?\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static { $this->traxDocuments = $traxDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\TraxDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ public function getTraxDocuments() : ?\OpenEuropa\EPoetry\Request\Type\TraxDocuments { @@ -82,17 +82,17 @@ public function hasTraxDocuments() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument + * @param null | \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static + public function setSpotDocument(?\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static { $this->spotDocument = $spotDocument; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DocumentIn */ public function getSpotDocument() : ?\OpenEuropa\EPoetry\Request\Type\DocumentIn { @@ -108,17 +108,17 @@ public function hasSpotDocument() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static + public function setPrtDocuments(?\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static { $this->prtDocuments = $prtDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\PrtDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ public function getPrtDocuments() : ?\OpenEuropa\EPoetry\Request\Type\PrtDocuments { @@ -134,17 +134,17 @@ public function hasPrtDocuments() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument + * @param null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument * @return $this */ - public function setSrcDocument(\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : static + public function setSrcDocument(?\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : static { $this->srcDocument = $srcDocument; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn */ public function getSrcDocument() : ?\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn { diff --git a/src/Request/Type/ContactPerson.php b/src/Request/Type/ContactPerson.php new file mode 100644 index 00000000..4bb438de --- /dev/null +++ b/src/Request/Type/ContactPerson.php @@ -0,0 +1,162 @@ +firstName = $firstName; + return $this; + } + + /** + * @return null | string + */ + public function getFirstName() : ?string + { + return $this->firstName; + } + + /** + * @return bool + */ + public function hasFirstName() : bool + { + return !empty($this->firstName); + } + + /** + * @param null | string $lastName + * @return $this + */ + public function setLastName(?string $lastName) : static + { + $this->lastName = $lastName; + return $this; + } + + /** + * @return null | string + */ + public function getLastName() : ?string + { + return $this->lastName; + } + + /** + * @return bool + */ + public function hasLastName() : bool + { + return !empty($this->lastName); + } + + /** + * @param null | string $email + * @return $this + */ + public function setEmail(?string $email) : static + { + $this->email = $email; + return $this; + } + + /** + * @return null | string + */ + public function getEmail() : ?string + { + return $this->email; + } + + /** + * @return bool + */ + public function hasEmail() : bool + { + return !empty($this->email); + } + + /** + * @param null | string $userId + * @return $this + */ + public function setUserId(?string $userId) : static + { + $this->userId = $userId; + return $this; + } + + /** + * @return null | string + */ + public function getUserId() : ?string + { + return $this->userId; + } + + /** + * @return bool + */ + public function hasUserId() : bool + { + return !empty($this->userId); + } + + /** + * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode + * @return $this + */ + public function setRoleCode(?string $roleCode) : static + { + $this->roleCode = $roleCode; + return $this; + } + + /** + * @return null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' + */ + public function getRoleCode() : ?string + { + return $this->roleCode; + } + + /** + * @return bool + */ + public function hasRoleCode() : bool + { + return !empty($this->roleCode); + } +} + diff --git a/src/Request/Type/ContactPersonIn.php b/src/Request/Type/ContactPersonIn.php index be020931..37ff8c2f 100644 --- a/src/Request/Type/ContactPersonIn.php +++ b/src/Request/Type/ContactPersonIn.php @@ -10,7 +10,7 @@ class ContactPersonIn private $userId; /** - * @var \OpenEuropa\EPoetry\Request\Type\ContactRole + * @var 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' */ private $contactRole; @@ -18,9 +18,9 @@ class ContactPersonIn * Constructor * * @param string $userId - * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole + * @param 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $contactRole */ - public function __construct(string $userId, \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole) + public function __construct(string $userId, string $contactRole) { $this->userId = $userId; $this->contactRole = $contactRole; @@ -37,9 +37,9 @@ public function setUserId(string $userId) : static } /** - * @return string|null + * @return string */ - public function getUserId() : ?string + public function getUserId() : string { return $this->userId; } @@ -53,19 +53,19 @@ public function hasUserId() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole + * @param 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $contactRole * @return $this */ - public function setContactRole(\OpenEuropa\EPoetry\Request\Type\ContactRole $contactRole) : static + public function setContactRole(string $contactRole) : static { $this->contactRole = $contactRole; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ContactRole|null + * @return 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' */ - public function getContactRole() : ?\OpenEuropa\EPoetry\Request\Type\ContactRole + public function getContactRole() : string { return $this->contactRole; } diff --git a/src/Request/Type/ContactPersonOut.php b/src/Request/Type/ContactPersonOut.php index befc4bd1..cd513943 100644 --- a/src/Request/Type/ContactPersonOut.php +++ b/src/Request/Type/ContactPersonOut.php @@ -5,40 +5,40 @@ class ContactPersonOut { /** - * @var string + * @var null | string */ - private $firstName; + private $firstName = null; /** - * @var string + * @var null | string */ - private $lastName; + private $lastName = null; /** - * @var string + * @var null | string */ - private $email; + private $email = null; /** - * @var string + * @var null | string */ - private $userId; + private $userId = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\ContactRole + * @var null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' */ - private $roleCode; + private $roleCode = null; /** * Constructor * - * @param string $firstName - * @param string $lastName - * @param string $email - * @param string $userId - * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode + * @param null | string $firstName + * @param null | string $lastName + * @param null | string $email + * @param null | string $userId + * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode */ - public function __construct(string $firstName, string $lastName, string $email, string $userId, \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode) + public function __construct(?string $firstName, ?string $lastName, ?string $email, ?string $userId, ?string $roleCode) { $this->firstName = $firstName; $this->lastName = $lastName; @@ -48,17 +48,17 @@ public function __construct(string $firstName, string $lastName, string $email, } /** - * @param string $firstName + * @param null | string $firstName * @return $this */ - public function setFirstName(string $firstName) : static + public function setFirstName(?string $firstName) : static { $this->firstName = $firstName; return $this; } /** - * @return string|null + * @return null | string */ public function getFirstName() : ?string { @@ -74,17 +74,17 @@ public function hasFirstName() : bool } /** - * @param string $lastName + * @param null | string $lastName * @return $this */ - public function setLastName(string $lastName) : static + public function setLastName(?string $lastName) : static { $this->lastName = $lastName; return $this; } /** - * @return string|null + * @return null | string */ public function getLastName() : ?string { @@ -100,17 +100,17 @@ public function hasLastName() : bool } /** - * @param string $email + * @param null | string $email * @return $this */ - public function setEmail(string $email) : static + public function setEmail(?string $email) : static { $this->email = $email; return $this; } /** - * @return string|null + * @return null | string */ public function getEmail() : ?string { @@ -126,17 +126,17 @@ public function hasEmail() : bool } /** - * @param string $userId + * @param null | string $userId * @return $this */ - public function setUserId(string $userId) : static + public function setUserId(?string $userId) : static { $this->userId = $userId; return $this; } /** - * @return string|null + * @return null | string */ public function getUserId() : ?string { @@ -152,19 +152,19 @@ public function hasUserId() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode + * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode * @return $this */ - public function setRoleCode(\OpenEuropa\EPoetry\Request\Type\ContactRole $roleCode) : static + public function setRoleCode(?string $roleCode) : static { $this->roleCode = $roleCode; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ContactRole|null + * @return null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' */ - public function getRoleCode() : ?\OpenEuropa\EPoetry\Request\Type\ContactRole + public function getRoleCode() : ?string { return $this->roleCode; } diff --git a/src/Request/Type/Contacts.php b/src/Request/Type/Contacts.php index 6ffe0e8f..64677f27 100644 --- a/src/Request/Type/Contacts.php +++ b/src/Request/Type/Contacts.php @@ -5,12 +5,13 @@ class Contacts { /** - * @var \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array + * @var non-empty-array, + * \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array> */ private $contact = []; /** - * @param ContactPersonIn[] $contact + * @param non-empty-array, ContactPersonIn[]> $contact * @return $this */ public function setContact(array $contact) : static @@ -20,7 +21,8 @@ public function setContact(array $contact) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array|null + * @return non-empty-array, + * \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array> */ public function getContact() : ?array { diff --git a/src/Request/Type/CorrectionDetailsIn.php b/src/Request/Type/CorrectionDetailsIn.php index cc655241..bf6effee 100644 --- a/src/Request/Type/CorrectionDetailsIn.php +++ b/src/Request/Type/CorrectionDetailsIn.php @@ -5,47 +5,47 @@ class CorrectionDetailsIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn + * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn */ - private $requestReference; + private $requestReference = null; /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary + * @var null | mixed */ - private $content; + private $content = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - private $language; + private $language = null; /** - * @var string + * @var null | string */ - private $remark; + private $remark = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn { @@ -61,17 +61,17 @@ public function hasRequestReference() : bool } /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -87,19 +87,19 @@ public function hasFileName() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content + * @param null | mixed $content * @return $this */ - public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static + public function setContent(mixed $content) : static { $this->content = $content; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null + * @return null | mixed */ - public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary + public function getContent() : mixed { return $this->content; } @@ -113,19 +113,19 @@ public function hasContent() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } @@ -139,19 +139,19 @@ public function hasFormat() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : ?string { return $this->language; } @@ -165,17 +165,17 @@ public function hasLanguage() : bool } /** - * @param string $remark + * @param null | string $remark * @return $this */ - public function setRemark(string $remark) : static + public function setRemark(?string $remark) : static { $this->remark = $remark; return $this; } /** - * @return string|null + * @return null | string */ public function getRemark() : ?string { diff --git a/src/Request/Type/CorrectionReferenceIn.php b/src/Request/Type/CorrectionReferenceIn.php index d3ebfc88..502886bd 100644 --- a/src/Request/Type/CorrectionReferenceIn.php +++ b/src/Request/Type/CorrectionReferenceIn.php @@ -5,22 +5,22 @@ class CorrectionReferenceIn { /** - * @var int + * @var null | int */ - private $version; + private $version = null; /** - * @param int $version + * @param null | int $version * @return $this */ - public function setVersion(int $version) : static + public function setVersion(?int $version) : static { $this->version = $version; return $this; } /** - * @return int|null + * @return null | int */ public function getVersion() : ?int { diff --git a/src/Request/Type/CorrectionRequestOut.php b/src/Request/Type/CorrectionRequestOut.php index a924eeaf..173f6573 100644 --- a/src/Request/Type/CorrectionRequestOut.php +++ b/src/Request/Type/CorrectionRequestOut.php @@ -5,27 +5,27 @@ class CorrectionRequestOut { /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ - private $requestReference; + private $requestReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DcoOut + * @var null | \OpenEuropa\EPoetry\Request\Type\DcoOut */ - private $DCO; + private $DCO = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DcoOut $DCO + * @param null | \OpenEuropa\EPoetry\Request\Type\DcoOut $DCO * @return $this */ - public function setDCO(\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : static + public function setDCO(?\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : static { $this->DCO = $DCO; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DcoOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DcoOut */ public function getDCO() : ?\OpenEuropa\EPoetry\Request\Type\DcoOut { diff --git a/src/Request/Type/CreateCorrectionRequest.php b/src/Request/Type/CreateCorrectionRequest.php index a9a3c201..fe795ad6 100644 --- a/src/Request/Type/CreateCorrectionRequest.php +++ b/src/Request/Type/CreateCorrectionRequest.php @@ -7,27 +7,27 @@ class CreateCorrectionRequest implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn */ - private $correctionDetails; + private $correctionDetails = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails * @return $this */ - public function setCorrectionDetails(\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : static + public function setCorrectionDetails(?\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : static { $this->correctionDetails = $correctionDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn */ public function getCorrectionDetails() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { @@ -43,17 +43,17 @@ public function hasCorrectionDetails() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/CreateCorrectionRequestResponse.php b/src/Request/Type/CreateCorrectionRequestResponse.php index e4c1b7e2..37987c91 100644 --- a/src/Request/Type/CreateCorrectionRequestResponse.php +++ b/src/Request/Type/CreateCorrectionRequestResponse.php @@ -7,22 +7,22 @@ class CreateCorrectionRequestResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut { diff --git a/src/Request/Type/CreateLinguisticRequest.php b/src/Request/Type/CreateLinguisticRequest.php index 887d8309..c96b23d6 100644 --- a/src/Request/Type/CreateLinguisticRequest.php +++ b/src/Request/Type/CreateLinguisticRequest.php @@ -7,32 +7,32 @@ class CreateLinguisticRequest implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails; + private $requestDetails = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @var string + * @var null | string */ - private $templateName; + private $templateName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { @@ -48,17 +48,17 @@ public function hasRequestDetails() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { @@ -74,17 +74,17 @@ public function hasApplicationName() : bool } /** - * @param string $templateName + * @param null | string $templateName * @return $this */ - public function setTemplateName(string $templateName) : static + public function setTemplateName(?string $templateName) : static { $this->templateName = $templateName; return $this; } /** - * @return string|null + * @return null | string */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/CreateLinguisticRequestResponse.php b/src/Request/Type/CreateLinguisticRequestResponse.php index 4b03def5..1e588e99 100644 --- a/src/Request/Type/CreateLinguisticRequestResponse.php +++ b/src/Request/Type/CreateLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class CreateLinguisticRequestResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/CreateNewVersion.php b/src/Request/Type/CreateNewVersion.php index 3e5e1781..913f7130 100644 --- a/src/Request/Type/CreateNewVersion.php +++ b/src/Request/Type/CreateNewVersion.php @@ -7,27 +7,27 @@ class CreateNewVersion implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ - private $linguisticRequest; + private $linguisticRequest = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest * @return $this */ - public function setLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : static + public function setLinguisticRequest(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : static { $this->linguisticRequest = $linguisticRequest; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ public function getLinguisticRequest() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { @@ -43,17 +43,17 @@ public function hasLinguisticRequest() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/CreateNewVersionResponse.php b/src/Request/Type/CreateNewVersionResponse.php index 56d184b4..9c50695d 100644 --- a/src/Request/Type/CreateNewVersionResponse.php +++ b/src/Request/Type/CreateNewVersionResponse.php @@ -7,22 +7,22 @@ class CreateNewVersionResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/DCO.php b/src/Request/Type/DCO.php new file mode 100644 index 00000000..30ca3608 --- /dev/null +++ b/src/Request/Type/DCO.php @@ -0,0 +1,224 @@ +applicationName = $applicationName; + return $this; + } + + /** + * @return null | string + */ + public function getApplicationName() : ?string + { + return $this->applicationName; + } + + /** + * @return bool + */ + public function hasApplicationName() : bool + { + return !empty($this->applicationName); + } + + /** + * @param null | \DateTimeInterface $deadline + * @return $this + */ + public function setDeadline(?\DateTimeInterface $deadline) : static + { + $this->deadline = $deadline; + return $this; + } + + /** + * @return null | \DateTimeInterface + */ + public function getDeadline() : ?\DateTimeInterface + { + return $this->deadline; + } + + /** + * @return bool + */ + public function hasDeadline() : bool + { + return !empty($this->deadline); + } + + /** + * @param null | string $fileName + * @return $this + */ + public function setFileName(?string $fileName) : static + { + $this->fileName = $fileName; + return $this; + } + + /** + * @return null | string + */ + public function getFileName() : ?string + { + return $this->fileName; + } + + /** + * @return bool + */ + public function hasFileName() : bool + { + return !empty($this->fileName); + } + + /** + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @return $this + */ + public function setFormat(?string $format) : static + { + $this->format = $format; + return $this; + } + + /** + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + */ + public function getFormat() : ?string + { + return $this->format; + } + + /** + * @return bool + */ + public function hasFormat() : bool + { + return !empty($this->format); + } + + /** + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @return $this + */ + public function setLanguage(?string $language) : static + { + $this->language = $language; + return $this; + } + + /** + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + */ + public function getLanguage() : ?string + { + return $this->language; + } + + /** + * @return bool + */ + public function hasLanguage() : bool + { + return !empty($this->language); + } + + /** + * @param null | string $remark + * @return $this + */ + public function setRemark(?string $remark) : static + { + $this->remark = $remark; + return $this; + } + + /** + * @return null | string + */ + public function getRemark() : ?string + { + return $this->remark; + } + + /** + * @return bool + */ + public function hasRemark() : bool + { + return !empty($this->remark); + } + + /** + * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status + * @return $this + */ + public function setStatus(?string $status) : static + { + $this->status = $status; + return $this; + } + + /** + * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' + */ + public function getStatus() : ?string + { + return $this->status; + } + + /** + * @return bool + */ + public function hasStatus() : bool + { + return !empty($this->status); + } +} + diff --git a/src/Request/Type/DcoOut.php b/src/Request/Type/DcoOut.php index 65568e9a..34114339 100644 --- a/src/Request/Type/DcoOut.php +++ b/src/Request/Type/DcoOut.php @@ -5,52 +5,52 @@ class DcoOut { /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $deadline; + private $deadline = null; /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - private $language; + private $language = null; /** - * @var string + * @var null | string */ - private $remark; + private $remark = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestStatus + * @var null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' */ - private $status; + private $status = null; /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { @@ -66,17 +66,17 @@ public function hasApplicationName() : bool } /** - * @param \DateTimeInterface $deadline + * @param null | \DateTimeInterface $deadline * @return $this */ - public function setDeadline(\DateTimeInterface $deadline) : static + public function setDeadline(?\DateTimeInterface $deadline) : static { $this->deadline = $deadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getDeadline() : ?\DateTimeInterface { @@ -92,17 +92,17 @@ public function hasDeadline() : bool } /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -118,19 +118,19 @@ public function hasFileName() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } @@ -144,19 +144,19 @@ public function hasFormat() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : ?string { return $this->language; } @@ -170,17 +170,17 @@ public function hasLanguage() : bool } /** - * @param string $remark + * @param null | string $remark * @return $this */ - public function setRemark(string $remark) : static + public function setRemark(?string $remark) : static { $this->remark = $remark; return $this; } /** - * @return string|null + * @return null | string */ public function getRemark() : ?string { @@ -196,19 +196,19 @@ public function hasRemark() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestStatus $status + * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status * @return $this */ - public function setStatus(\OpenEuropa\EPoetry\Request\Type\RequestStatus $status) : static + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestStatus|null + * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' */ - public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\RequestStatus + public function getStatus() : ?string { return $this->status; } diff --git a/src/Request/Type/DocumentIn.php b/src/Request/Type/DocumentIn.php index ae8e5aaf..9e7cdb63 100644 --- a/src/Request/Type/DocumentIn.php +++ b/src/Request/Type/DocumentIn.php @@ -5,37 +5,37 @@ class DocumentIn { /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ private $language; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary + * @var null | mixed */ - private $content; + private $content = null; /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -51,19 +51,19 @@ public function hasFileName() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : string { return $this->language; } @@ -77,17 +77,17 @@ public function hasLanguage() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -103,19 +103,19 @@ public function hasComment() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content + * @param null | mixed $content * @return $this */ - public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static + public function setContent(mixed $content) : static { $this->content = $content; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null + * @return null | mixed */ - public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary + public function getContent() : mixed { return $this->content; } diff --git a/src/Request/Type/Dossier.php b/src/Request/Type/Dossier.php new file mode 100644 index 00000000..7b961db7 --- /dev/null +++ b/src/Request/Type/Dossier.php @@ -0,0 +1,100 @@ +requesterCode = $requesterCode; + return $this; + } + + /** + * @return null | string + */ + public function getRequesterCode() : ?string + { + return $this->requesterCode; + } + + /** + * @return bool + */ + public function hasRequesterCode() : bool + { + return !empty($this->requesterCode); + } + + /** + * @param null | int $number + * @return $this + */ + public function setNumber(?int $number) : static + { + $this->number = $number; + return $this; + } + + /** + * @return null | int + */ + public function getNumber() : ?int + { + return $this->number; + } + + /** + * @return bool + */ + public function hasNumber() : bool + { + return !empty($this->number); + } + + /** + * @param null | int $year + * @return $this + */ + public function setYear(?int $year) : static + { + $this->year = $year; + return $this; + } + + /** + * @return null | int + */ + public function getYear() : ?int + { + return $this->year; + } + + /** + * @return bool + */ + public function hasYear() : bool + { + return !empty($this->year); + } +} + diff --git a/src/Request/Type/DossierReference.php b/src/Request/Type/DossierReference.php index 0dbac799..89679789 100644 --- a/src/Request/Type/DossierReference.php +++ b/src/Request/Type/DossierReference.php @@ -5,32 +5,32 @@ class DossierReference { /** - * @var string + * @var null | string */ - private $requesterCode; + private $requesterCode = null; /** - * @var int + * @var null | int */ - private $number; + private $number = null; /** - * @var int + * @var null | int */ - private $year; + private $year = null; /** - * @param string $requesterCode + * @param null | string $requesterCode * @return $this */ - public function setRequesterCode(string $requesterCode) : static + public function setRequesterCode(?string $requesterCode) : static { $this->requesterCode = $requesterCode; return $this; } /** - * @return string|null + * @return null | string */ public function getRequesterCode() : ?string { @@ -46,17 +46,17 @@ public function hasRequesterCode() : bool } /** - * @param int $number + * @param null | int $number * @return $this */ - public function setNumber(int $number) : static + public function setNumber(?int $number) : static { $this->number = $number; return $this; } /** - * @return int|null + * @return null | int */ public function getNumber() : ?int { @@ -72,17 +72,17 @@ public function hasNumber() : bool } /** - * @param int $year + * @param null | int $year * @return $this */ - public function setYear(int $year) : static + public function setYear(?int $year) : static { $this->year = $year; return $this; } /** - * @return int|null + * @return null | int */ public function getYear() : ?int { diff --git a/src/Request/Type/GetLinguisticRequest.php b/src/Request/Type/GetLinguisticRequest.php index 0bdbee0f..bfb95e80 100644 --- a/src/Request/Type/GetLinguisticRequest.php +++ b/src/Request/Type/GetLinguisticRequest.php @@ -7,27 +7,27 @@ class GetLinguisticRequest implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ - private $requestReference; + private $requestReference = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { @@ -43,17 +43,17 @@ public function hasRequestReference() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/GetLinguisticRequestResponse.php b/src/Request/Type/GetLinguisticRequestResponse.php index 26a82b33..492e2ad8 100644 --- a/src/Request/Type/GetLinguisticRequestResponse.php +++ b/src/Request/Type/GetLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class GetLinguisticRequestResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/InformativeMessages.php b/src/Request/Type/InformativeMessages.php index 2d2faa66..0e61a654 100644 --- a/src/Request/Type/InformativeMessages.php +++ b/src/Request/Type/InformativeMessages.php @@ -5,12 +5,12 @@ class InformativeMessages { /** - * @var string[]|array + * @var array, string[]|array> */ private $message = []; /** - * @param string[] $message + * @param array, string[]> $message * @return $this */ public function setMessage(array $message) : static @@ -20,7 +20,7 @@ public function setMessage(array $message) : static } /** - * @return string[]|array|null + * @return array, string[]|array> */ public function getMessage() : ?array { diff --git a/src/Request/Type/LinguisticRequestIn.php b/src/Request/Type/LinguisticRequestIn.php index 1ca1e202..759ed872 100644 --- a/src/Request/Type/LinguisticRequestIn.php +++ b/src/Request/Type/LinguisticRequestIn.php @@ -5,27 +5,27 @@ class LinguisticRequestIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ - private $requestReference; + private $requestReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails; + private $requestDetails = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { diff --git a/src/Request/Type/LinguisticRequestOut.php b/src/Request/Type/LinguisticRequestOut.php index 20450490..0cc5b06c 100644 --- a/src/Request/Type/LinguisticRequestOut.php +++ b/src/Request/Type/LinguisticRequestOut.php @@ -5,32 +5,32 @@ class LinguisticRequestOut { /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ - private $requestReference; + private $requestReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut */ - private $requestDetails; + private $requestDetails = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\InformativeMessages + * @var null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages */ - private $informativeMessages; + private $informativeMessages = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { @@ -46,17 +46,17 @@ public function hasRequestReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { @@ -72,17 +72,17 @@ public function hasRequestDetails() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages + * @param null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages * @return $this */ - public function setInformativeMessages(\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static + public function setInformativeMessages(?\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static { $this->informativeMessages = $informativeMessages; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\InformativeMessages|null + * @return null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages */ public function getInformativeMessages() : ?\OpenEuropa\EPoetry\Request\Type\InformativeMessages { diff --git a/src/Request/Type/LinguisticSection.php b/src/Request/Type/LinguisticSection.php new file mode 100644 index 00000000..12566fa9 --- /dev/null +++ b/src/Request/Type/LinguisticSection.php @@ -0,0 +1,38 @@ +language = $language; + return $this; + } + + /** + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + */ + public function getLanguage() : ?string + { + return $this->language; + } + + /** + * @return bool + */ + public function hasLanguage() : bool + { + return !empty($this->language); + } +} + diff --git a/src/Request/Type/LinguisticSectionIn.php b/src/Request/Type/LinguisticSectionIn.php index 1391c52c..54aab273 100644 --- a/src/Request/Type/LinguisticSectionIn.php +++ b/src/Request/Type/LinguisticSectionIn.php @@ -5,34 +5,34 @@ class LinguisticSectionIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ private $language; /** * Constructor * - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language */ - public function __construct(\OpenEuropa\EPoetry\Request\Type\Language $language) + public function __construct(string $language) { $this->language = $language; } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : string { return $this->language; } diff --git a/src/Request/Type/LinguisticSectionOut.php b/src/Request/Type/LinguisticSectionOut.php index c925d01e..bad9cfe2 100644 --- a/src/Request/Type/LinguisticSectionOut.php +++ b/src/Request/Type/LinguisticSectionOut.php @@ -5,34 +5,34 @@ class LinguisticSectionOut { /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - private $language; + private $language = null; /** * Constructor * - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language */ - public function __construct(\OpenEuropa\EPoetry\Request\Type\Language $language) + public function __construct(?string $language) { $this->language = $language; } /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : ?string { return $this->language; } diff --git a/src/Request/Type/LinguisticSections.php b/src/Request/Type/LinguisticSections.php index ba84a9a2..9164a08f 100644 --- a/src/Request/Type/LinguisticSections.php +++ b/src/Request/Type/LinguisticSections.php @@ -5,12 +5,13 @@ class LinguisticSections { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array + * @var array, + * \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array> */ private $linguisticSection = []; /** - * @param LinguisticSectionOut[] $linguisticSection + * @param array, LinguisticSectionOut[]> $linguisticSection * @return $this */ public function setLinguisticSection(array $linguisticSection) : static @@ -20,7 +21,8 @@ public function setLinguisticSection(array $linguisticSection) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array|null + * @return array, + * \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array> */ public function getLinguisticSection() : ?array { diff --git a/src/Request/Type/LinquisticRequest.php b/src/Request/Type/LinquisticRequest.php new file mode 100644 index 00000000..5cebfa90 --- /dev/null +++ b/src/Request/Type/LinquisticRequest.php @@ -0,0 +1,100 @@ +requestReference = $requestReference; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + */ + public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + { + return $this->requestReference; + } + + /** + * @return bool + */ + public function hasRequestReference() : bool + { + return !empty($this->requestReference); + } + + /** + * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails + * @return $this + */ + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static + { + $this->requestDetails = $requestDetails; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + */ + public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + { + return $this->requestDetails; + } + + /** + * @return bool + */ + public function hasRequestDetails() : bool + { + return !empty($this->requestDetails); + } + + /** + * @param null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages + * @return $this + */ + public function setInformativeMessages(?\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static + { + $this->informativeMessages = $informativeMessages; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages + */ + public function getInformativeMessages() : ?\OpenEuropa\EPoetry\Request\Type\InformativeMessages + { + return $this->informativeMessages; + } + + /** + * @return bool + */ + public function hasInformativeMessages() : bool + { + return !empty($this->informativeMessages); + } +} + diff --git a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php index 966084c3..a90ce5b5 100644 --- a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php +++ b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php @@ -5,37 +5,37 @@ class ModifyAuxiliaryDocumentsIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ - private $referenceDocuments; + private $referenceDocuments = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ - private $traxDocuments; + private $traxDocuments = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @var null | \OpenEuropa\EPoetry\Request\Type\DocumentIn */ - private $spotDocument; + private $spotDocument = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ - private $prtDocuments; + private $prtDocuments = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static + public function setReferenceDocuments(?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static { $this->referenceDocuments = $referenceDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ public function getReferenceDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments { @@ -51,17 +51,17 @@ public function hasReferenceDocuments() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static + public function setTraxDocuments(?\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static { $this->traxDocuments = $traxDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\TraxDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ public function getTraxDocuments() : ?\OpenEuropa\EPoetry\Request\Type\TraxDocuments { @@ -77,17 +77,17 @@ public function hasTraxDocuments() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument + * @param null | \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static + public function setSpotDocument(?\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static { $this->spotDocument = $spotDocument; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DocumentIn */ public function getSpotDocument() : ?\OpenEuropa\EPoetry\Request\Type\DocumentIn { @@ -103,17 +103,17 @@ public function hasSpotDocument() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static + public function setPrtDocuments(?\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static { $this->prtDocuments = $prtDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\PrtDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ public function getPrtDocuments() : ?\OpenEuropa\EPoetry\Request\Type\PrtDocuments { diff --git a/src/Request/Type/ModifyLinguisticRequest.php b/src/Request/Type/ModifyLinguisticRequest.php index dc4f8485..3c0c9dd8 100644 --- a/src/Request/Type/ModifyLinguisticRequest.php +++ b/src/Request/Type/ModifyLinguisticRequest.php @@ -7,27 +7,27 @@ class ModifyLinguisticRequest implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn + * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn */ - private $modifyLinguisticRequest; + private $modifyLinguisticRequest = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest + * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest * @return $this */ - public function setModifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : static + public function setModifyLinguisticRequest(?\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : static { $this->modifyLinguisticRequest = $modifyLinguisticRequest; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn */ public function getModifyLinguisticRequest() : ?\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn { @@ -43,17 +43,17 @@ public function hasModifyLinguisticRequest() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/ModifyLinguisticRequestIn.php b/src/Request/Type/ModifyLinguisticRequestIn.php index df6dd872..69646988 100644 --- a/src/Request/Type/ModifyLinguisticRequestIn.php +++ b/src/Request/Type/ModifyLinguisticRequestIn.php @@ -5,27 +5,27 @@ class ModifyLinguisticRequestIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn */ - private $requestReference; + private $requestReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn */ - private $requestDetails; + private $requestDetails = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference + * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : static + public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails + * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : static + public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : static { $this->requestDetails = $requestDetails; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn { diff --git a/src/Request/Type/ModifyLinguisticRequestResponse.php b/src/Request/Type/ModifyLinguisticRequestResponse.php index 87872b98..55b0bf97 100644 --- a/src/Request/Type/ModifyLinguisticRequestResponse.php +++ b/src/Request/Type/ModifyLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class ModifyLinguisticRequestResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/ModifyProductRequestIn.php b/src/Request/Type/ModifyProductRequestIn.php index 1881b08e..aa320e9d 100644 --- a/src/Request/Type/ModifyProductRequestIn.php +++ b/src/Request/Type/ModifyProductRequestIn.php @@ -5,7 +5,7 @@ class ModifyProductRequestIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ private $language; @@ -20,19 +20,19 @@ class ModifyProductRequestIn private $trackChanges; /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : string { return $this->language; } @@ -56,9 +56,9 @@ public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : st } /** - * @return \DateTimeInterface|null + * @return \DateTimeInterface */ - public function getRequestedDeadline() : ?\DateTimeInterface + public function getRequestedDeadline() : \DateTimeInterface { return $this->requestedDeadline; } @@ -82,9 +82,9 @@ public function setTrackChanges(bool $trackChanges) : static } /** - * @return bool|null + * @return bool */ - public function isTrackChanges() : ?bool + public function isTrackChanges() : bool { return $this->trackChanges; } diff --git a/src/Request/Type/ModifyRequestDetailsIn.php b/src/Request/Type/ModifyRequestDetailsIn.php index 5af0eb8a..cae1fa9e 100644 --- a/src/Request/Type/ModifyRequestDetailsIn.php +++ b/src/Request/Type/ModifyRequestDetailsIn.php @@ -10,14 +10,14 @@ class ModifyRequestDetailsIn private $contacts; /** - * @var \OpenEuropa\EPoetry\Request\Type\Products + * @var null | \OpenEuropa\EPoetry\Request\Type\Products */ - private $products; + private $products = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn */ - private $auxiliaryDocuments; + private $auxiliaryDocuments = null; /** * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts @@ -30,9 +30,9 @@ public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) } /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null + * @return \OpenEuropa\EPoetry\Request\Type\Contacts */ - public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts + public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts { return $this->contacts; } @@ -46,17 +46,17 @@ public function hasContacts() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Products $products + * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static + public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static { $this->products = $products; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Products|null + * @return null | \OpenEuropa\EPoetry\Request\Type\Products */ public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products { @@ -72,17 +72,17 @@ public function hasProducts() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { diff --git a/src/Request/Type/ModifyRequestReferenceIn.php b/src/Request/Type/ModifyRequestReferenceIn.php index bacebe35..91c8a783 100644 --- a/src/Request/Type/ModifyRequestReferenceIn.php +++ b/src/Request/Type/ModifyRequestReferenceIn.php @@ -5,32 +5,32 @@ class ModifyRequestReferenceIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier; + private $dossier = null; /** - * @var string + * @var null | string */ - private $productType; + private $productType = null; /** - * @var int + * @var null | int */ - private $part; + private $part = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -46,17 +46,17 @@ public function hasDossier() : bool } /** - * @param string $productType + * @param null | string $productType * @return $this */ - public function setProductType(string $productType) : static + public function setProductType(?string $productType) : static { $this->productType = $productType; return $this; } /** - * @return string|null + * @return null | string */ public function getProductType() : ?string { @@ -72,17 +72,17 @@ public function hasProductType() : bool } /** - * @param int $part + * @param null | int $part * @return $this */ - public function setPart(int $part) : static + public function setPart(?int $part) : static { $this->part = $part; return $this; } /** - * @return int|null + * @return null | int */ public function getPart() : ?int { diff --git a/src/Request/Type/NoSuchMethodException.php b/src/Request/Type/NoSuchMethodException.php index 5531e726..0140b882 100644 --- a/src/Request/Type/NoSuchMethodException.php +++ b/src/Request/Type/NoSuchMethodException.php @@ -5,22 +5,22 @@ class NoSuchMethodException { /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : static + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { diff --git a/src/Request/Type/OriginalDocument.php b/src/Request/Type/OriginalDocument.php new file mode 100644 index 00000000..e7732c84 --- /dev/null +++ b/src/Request/Type/OriginalDocument.php @@ -0,0 +1,193 @@ +trackChanges = $trackChanges; + return $this; + } + + /** + * @return bool + */ + public function isTrackChanges() : bool + { + return $this->trackChanges; + } + + /** + * @return bool + */ + public function hasTrackChanges() : bool + { + return !empty($this->trackChanges); + } + + /** + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @return $this + */ + public function setFormat(?string $format) : static + { + $this->format = $format; + return $this; + } + + /** + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + */ + public function getFormat() : ?string + { + return $this->format; + } + + /** + * @return bool + */ + public function hasFormat() : bool + { + return !empty($this->format); + } + + /** + * @param null | string $fileName + * @return $this + */ + public function setFileName(?string $fileName) : static + { + $this->fileName = $fileName; + return $this; + } + + /** + * @return null | string + */ + public function getFileName() : ?string + { + return $this->fileName; + } + + /** + * @return bool + */ + public function hasFileName() : bool + { + return !empty($this->fileName); + } + + /** + * @param null | float $pages + * @return $this + */ + public function setPages(?float $pages) : static + { + $this->pages = $pages; + return $this; + } + + /** + * @return null | float + */ + public function getPages() : ?float + { + return $this->pages; + } + + /** + * @return bool + */ + public function hasPages() : bool + { + return !empty($this->pages); + } + + /** + * @param null | string $comment + * @return $this + */ + public function setComment(?string $comment) : static + { + $this->comment = $comment; + return $this; + } + + /** + * @return null | string + */ + public function getComment() : ?string + { + return $this->comment; + } + + /** + * @return bool + */ + public function hasComment() : bool + { + return !empty($this->comment); + } + + /** + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections + * @return $this + */ + public function setLinguisticSections(?\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static + { + $this->linguisticSections = $linguisticSections; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections + */ + public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections + { + return $this->linguisticSections; + } + + /** + * @return bool + */ + public function hasLinguisticSections() : bool + { + return !empty($this->linguisticSections); + } +} + diff --git a/src/Request/Type/OriginalDocumentIn.php b/src/Request/Type/OriginalDocumentIn.php index 92f16344..93fcfe79 100644 --- a/src/Request/Type/OriginalDocumentIn.php +++ b/src/Request/Type/OriginalDocumentIn.php @@ -5,19 +5,19 @@ class OriginalDocumentIn { /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary + * @var null | mixed */ - private $content; + private $content = null; /** * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSections @@ -30,17 +30,17 @@ class OriginalDocumentIn private $trackChanges; /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -56,17 +56,17 @@ public function hasFileName() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -82,19 +82,19 @@ public function hasComment() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content + * @param null | mixed $content * @return $this */ - public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static + public function setContent(mixed $content) : static { $this->content = $content; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null + * @return null | mixed */ - public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary + public function getContent() : mixed { return $this->content; } @@ -118,9 +118,9 @@ public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\Linguisti } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections|null + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections */ - public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections + public function getLinguisticSections() : \OpenEuropa\EPoetry\Request\Type\LinguisticSections { return $this->linguisticSections; } @@ -144,9 +144,9 @@ public function setTrackChanges(bool $trackChanges) : static } /** - * @return bool|null + * @return bool */ - public function isTrackChanges() : ?bool + public function isTrackChanges() : bool { return $this->trackChanges; } diff --git a/src/Request/Type/OriginalDocumentOut.php b/src/Request/Type/OriginalDocumentOut.php index a0e760b7..0ae6f6bc 100644 --- a/src/Request/Type/OriginalDocumentOut.php +++ b/src/Request/Type/OriginalDocumentOut.php @@ -10,29 +10,29 @@ class OriginalDocumentOut private $trackChanges; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var float + * @var null | float */ - private $pages; + private $pages = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSections + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections */ - private $linguisticSections; + private $linguisticSections = null; /** * @param bool $trackChanges @@ -45,9 +45,9 @@ public function setTrackChanges(bool $trackChanges) : static } /** - * @return bool|null + * @return bool */ - public function isTrackChanges() : ?bool + public function isTrackChanges() : bool { return $this->trackChanges; } @@ -61,19 +61,19 @@ public function hasTrackChanges() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } @@ -87,17 +87,17 @@ public function hasFormat() : bool } /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -113,17 +113,17 @@ public function hasFileName() : bool } /** - * @param float $pages + * @param null | float $pages * @return $this */ - public function setPages(float $pages) : static + public function setPages(?float $pages) : static { $this->pages = $pages; return $this; } /** - * @return float|null + * @return null | float */ public function getPages() : ?float { @@ -139,17 +139,17 @@ public function hasPages() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -165,17 +165,17 @@ public function hasComment() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections * @return $this */ - public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static + public function setLinguisticSections(?\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static { $this->linguisticSections = $linguisticSections; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections */ public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections { diff --git a/src/Request/Type/Product.php b/src/Request/Type/Product.php new file mode 100644 index 00000000..cf9e310c --- /dev/null +++ b/src/Request/Type/Product.php @@ -0,0 +1,100 @@ +language = $language; + return $this; + } + + /** + * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + */ + public function getLanguage() : string + { + return $this->language; + } + + /** + * @return bool + */ + public function hasLanguage() : bool + { + return !empty($this->language); + } + + /** + * @param \DateTimeInterface $requestedDeadline + * @return $this + */ + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + { + $this->requestedDeadline = $requestedDeadline; + return $this; + } + + /** + * @return \DateTimeInterface + */ + public function getRequestedDeadline() : \DateTimeInterface + { + return $this->requestedDeadline; + } + + /** + * @return bool + */ + public function hasRequestedDeadline() : bool + { + return !empty($this->requestedDeadline); + } + + /** + * @param bool $trackChanges + * @return $this + */ + public function setTrackChanges(bool $trackChanges) : static + { + $this->trackChanges = $trackChanges; + return $this; + } + + /** + * @return bool + */ + public function isTrackChanges() : bool + { + return $this->trackChanges; + } + + /** + * @return bool + */ + public function hasTrackChanges() : bool + { + return !empty($this->trackChanges); + } +} + diff --git a/src/Request/Type/ProductRequestIn.php b/src/Request/Type/ProductRequestIn.php index 612688fc..44b49113 100644 --- a/src/Request/Type/ProductRequestIn.php +++ b/src/Request/Type/ProductRequestIn.php @@ -5,14 +5,14 @@ class ProductRequestIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ private $language; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $requestedDeadline; + private $requestedDeadline = null; /** * @var bool @@ -20,19 +20,19 @@ class ProductRequestIn private $trackChanges; /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : string { return $this->language; } @@ -46,17 +46,17 @@ public function hasLanguage() : bool } /** - * @param \DateTimeInterface $requestedDeadline + * @param null | \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -82,9 +82,9 @@ public function setTrackChanges(bool $trackChanges) : static } /** - * @return bool|null + * @return bool */ - public function isTrackChanges() : ?bool + public function isTrackChanges() : bool { return $this->trackChanges; } diff --git a/src/Request/Type/ProductRequestOut.php b/src/Request/Type/ProductRequestOut.php index 93ae30e4..014714c8 100644 --- a/src/Request/Type/ProductRequestOut.php +++ b/src/Request/Type/ProductRequestOut.php @@ -5,19 +5,19 @@ class ProductRequestOut { /** - * @var \OpenEuropa\EPoetry\Request\Type\Language + * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - private $language; + private $language = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $requestedDeadline; + private $requestedDeadline = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $acceptedDeadline; + private $acceptedDeadline = null; /** * @var bool @@ -25,29 +25,29 @@ class ProductRequestOut private $trackChanges; /** - * @var \OpenEuropa\EPoetry\Request\Type\ProductStatus + * @var null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' */ - private $status; + private $status = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentFormat + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\Language $language + * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language * @return $this */ - public function setLanguage(\OpenEuropa\EPoetry\Request\Type\Language $language) : static + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Language|null + * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' */ - public function getLanguage() : ?\OpenEuropa\EPoetry\Request\Type\Language + public function getLanguage() : ?string { return $this->language; } @@ -61,17 +61,17 @@ public function hasLanguage() : bool } /** - * @param \DateTimeInterface $requestedDeadline + * @param null | \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -87,17 +87,17 @@ public function hasRequestedDeadline() : bool } /** - * @param \DateTimeInterface $acceptedDeadline + * @param null | \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -123,9 +123,9 @@ public function setTrackChanges(bool $trackChanges) : static } /** - * @return bool|null + * @return bool */ - public function isTrackChanges() : ?bool + public function isTrackChanges() : bool { return $this->trackChanges; } @@ -139,19 +139,19 @@ public function hasTrackChanges() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ProductStatus $status + * @param null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' $status * @return $this */ - public function setStatus(\OpenEuropa\EPoetry\Request\Type\ProductStatus $status) : static + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ProductStatus|null + * @return null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' */ - public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\ProductStatus + public function getStatus() : ?string { return $this->status; } @@ -165,19 +165,19 @@ public function hasStatus() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\DocumentFormat $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(\OpenEuropa\EPoetry\Request\Type\DocumentFormat $format) : static + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentFormat|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - public function getFormat() : ?\OpenEuropa\EPoetry\Request\Type\DocumentFormat + public function getFormat() : ?string { return $this->format; } diff --git a/src/Request/Type/Products.php b/src/Request/Type/Products.php index 2a1f9b20..9cdda099 100644 --- a/src/Request/Type/Products.php +++ b/src/Request/Type/Products.php @@ -5,12 +5,13 @@ class Products { /** - * @var \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array + * @var array, + * \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array> */ private $product = []; /** - * @param ModifyProductRequestIn[] $product + * @param array, ModifyProductRequestIn[]> $product * @return $this */ public function setProduct(array $product) : static @@ -20,7 +21,8 @@ public function setProduct(array $product) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array|null + * @return array, + * \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array> */ public function getProduct() : ?array { diff --git a/src/Request/Type/PrtDocuments.php b/src/Request/Type/PrtDocuments.php index 4eb19546..8f8c8a33 100644 --- a/src/Request/Type/PrtDocuments.php +++ b/src/Request/Type/PrtDocuments.php @@ -5,12 +5,12 @@ class PrtDocuments { /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array + * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ private $document = []; /** - * @param DocumentIn[] $document + * @param array, DocumentIn[]> $document * @return $this */ public function setDocument(array $document) : static @@ -20,7 +20,7 @@ public function setDocument(array $document) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null + * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ public function getDocument() : ?array { diff --git a/src/Request/Type/ReferenceDocuments.php b/src/Request/Type/ReferenceDocuments.php index 9418dd92..d1aaac39 100644 --- a/src/Request/Type/ReferenceDocuments.php +++ b/src/Request/Type/ReferenceDocuments.php @@ -5,12 +5,12 @@ class ReferenceDocuments { /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array + * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ private $document = []; /** - * @param DocumentIn[] $document + * @param array, DocumentIn[]> $document * @return $this */ public function setDocument(array $document) : static @@ -20,7 +20,7 @@ public function setDocument(array $document) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null + * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ public function getDocument() : ?array { diff --git a/src/Request/Type/RequestDetails.php b/src/Request/Type/RequestDetails.php new file mode 100644 index 00000000..a4137aac --- /dev/null +++ b/src/Request/Type/RequestDetails.php @@ -0,0 +1,100 @@ +contacts = $contacts; + return $this; + } + + /** + * @return \OpenEuropa\EPoetry\Request\Type\Contacts + */ + public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts + { + return $this->contacts; + } + + /** + * @return bool + */ + public function hasContacts() : bool + { + return !empty($this->contacts); + } + + /** + * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products + * @return $this + */ + public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static + { + $this->products = $products; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\Products + */ + public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products + { + return $this->products; + } + + /** + * @return bool + */ + public function hasProducts() : bool + { + return !empty($this->products); + } + + /** + * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments + * @return $this + */ + public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static + { + $this->auxiliaryDocuments = $auxiliaryDocuments; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + */ + public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + { + return $this->auxiliaryDocuments; + } + + /** + * @return bool + */ + public function hasAuxiliaryDocuments() : bool + { + return !empty($this->auxiliaryDocuments); + } +} + diff --git a/src/Request/Type/RequestDetailsIn.php b/src/Request/Type/RequestDetailsIn.php index f88fa697..82dc4763 100644 --- a/src/Request/Type/RequestDetailsIn.php +++ b/src/Request/Type/RequestDetailsIn.php @@ -10,89 +10,89 @@ class RequestDetailsIn private $title; /** - * @var \OpenEuropa\EPoetry\Request\Type\WorkflowCode + * @var null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' */ - private $workflowCode; + private $workflowCode = null; /** - * @var string + * @var null | string */ - private $internalReference; + private $internalReference = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $requestedDeadline; + private $requestedDeadline = null; /** - * @var bool + * @var null | bool */ - private $sensitive; + private $sensitive = null; /** - * @var bool + * @var null | bool */ - private $sentViaRue; + private $sentViaRue = null; /** - * @var bool + * @var null | bool */ - private $documentToAdopt; + private $documentToAdopt = null; /** - * @var string + * @var null | string */ - private $decideReference; + private $decideReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Destination + * @var null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' */ - private $destination; + private $destination = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Procedure + * @var null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' */ - private $procedure; + private $procedure = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\SlaAnnex + * @var null | 'ANNEX8A' | 'ANNEX8B' | 'NO' */ - private $slaAnnex; + private $slaAnnex = null; /** - * @var string + * @var null | string */ - private $slaCommitment; + private $slaCommitment = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var string + * @var null | string */ - private $onBehalfOf; + private $onBehalfOf = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\AccessLevel + * @var null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' */ - private $accessibleTo; + private $accessibleTo = null; /** - * @var string + * @var null | string */ - private $keyword1; + private $keyword1 = null; /** - * @var string + * @var null | string */ - private $keyword2; + private $keyword2 = null; /** - * @var string + * @var null | string */ - private $keyword3; + private $keyword3 = null; /** * @var \OpenEuropa\EPoetry\Request\Type\Contacts @@ -110,9 +110,9 @@ class RequestDetailsIn private $products; /** - * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + * @var null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn */ - private $auxiliaryDocuments; + private $auxiliaryDocuments = null; /** * @param string $title @@ -125,9 +125,9 @@ public function setTitle(string $title) : static } /** - * @return string|null + * @return string */ - public function getTitle() : ?string + public function getTitle() : string { return $this->title; } @@ -141,19 +141,19 @@ public function hasTitle() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode + * @param null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' $workflowCode * @return $this */ - public function setWorkflowCode(\OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode) : static + public function setWorkflowCode(?string $workflowCode) : static { $this->workflowCode = $workflowCode; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\WorkflowCode|null + * @return null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' */ - public function getWorkflowCode() : ?\OpenEuropa\EPoetry\Request\Type\WorkflowCode + public function getWorkflowCode() : ?string { return $this->workflowCode; } @@ -167,17 +167,17 @@ public function hasWorkflowCode() : bool } /** - * @param string $internalReference + * @param null | string $internalReference * @return $this */ - public function setInternalReference(string $internalReference) : static + public function setInternalReference(?string $internalReference) : static { $this->internalReference = $internalReference; return $this; } /** - * @return string|null + * @return null | string */ public function getInternalReference() : ?string { @@ -193,17 +193,17 @@ public function hasInternalReference() : bool } /** - * @param \DateTimeInterface $requestedDeadline + * @param null | \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -219,17 +219,17 @@ public function hasRequestedDeadline() : bool } /** - * @param bool $sensitive + * @param null | bool $sensitive * @return $this */ - public function setSensitive(bool $sensitive) : static + public function setSensitive(?bool $sensitive) : static { $this->sensitive = $sensitive; return $this; } /** - * @return bool|null + * @return null | bool */ public function isSensitive() : ?bool { @@ -245,17 +245,17 @@ public function hasSensitive() : bool } /** - * @param bool $sentViaRue + * @param null | bool $sentViaRue * @return $this */ - public function setSentViaRue(bool $sentViaRue) : static + public function setSentViaRue(?bool $sentViaRue) : static { $this->sentViaRue = $sentViaRue; return $this; } /** - * @return bool|null + * @return null | bool */ public function isSentViaRue() : ?bool { @@ -271,17 +271,17 @@ public function hasSentViaRue() : bool } /** - * @param bool $documentToAdopt + * @param null | bool $documentToAdopt * @return $this */ - public function setDocumentToAdopt(bool $documentToAdopt) : static + public function setDocumentToAdopt(?bool $documentToAdopt) : static { $this->documentToAdopt = $documentToAdopt; return $this; } /** - * @return bool|null + * @return null | bool */ public function isDocumentToAdopt() : ?bool { @@ -297,17 +297,17 @@ public function hasDocumentToAdopt() : bool } /** - * @param string $decideReference + * @param null | string $decideReference * @return $this */ - public function setDecideReference(string $decideReference) : static + public function setDecideReference(?string $decideReference) : static { $this->decideReference = $decideReference; return $this; } /** - * @return string|null + * @return null | string */ public function getDecideReference() : ?string { @@ -323,19 +323,19 @@ public function hasDecideReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Destination $destination + * @param null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' $destination * @return $this */ - public function setDestination(\OpenEuropa\EPoetry\Request\Type\Destination $destination) : static + public function setDestination(?string $destination) : static { $this->destination = $destination; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Destination|null + * @return null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' */ - public function getDestination() : ?\OpenEuropa\EPoetry\Request\Type\Destination + public function getDestination() : ?string { return $this->destination; } @@ -349,19 +349,19 @@ public function hasDestination() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Procedure $procedure + * @param null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' $procedure * @return $this */ - public function setProcedure(\OpenEuropa\EPoetry\Request\Type\Procedure $procedure) : static + public function setProcedure(?string $procedure) : static { $this->procedure = $procedure; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Procedure|null + * @return null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' */ - public function getProcedure() : ?\OpenEuropa\EPoetry\Request\Type\Procedure + public function getProcedure() : ?string { return $this->procedure; } @@ -375,19 +375,19 @@ public function hasProcedure() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex + * @param null | 'ANNEX8A' | 'ANNEX8B' | 'NO' $slaAnnex * @return $this */ - public function setSlaAnnex(\OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex) : static + public function setSlaAnnex(?string $slaAnnex) : static { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\SlaAnnex|null + * @return null | 'ANNEX8A' | 'ANNEX8B' | 'NO' */ - public function getSlaAnnex() : ?\OpenEuropa\EPoetry\Request\Type\SlaAnnex + public function getSlaAnnex() : ?string { return $this->slaAnnex; } @@ -401,17 +401,17 @@ public function hasSlaAnnex() : bool } /** - * @param string $slaCommitment + * @param null | string $slaCommitment * @return $this */ - public function setSlaCommitment(string $slaCommitment) : static + public function setSlaCommitment(?string $slaCommitment) : static { $this->slaCommitment = $slaCommitment; return $this; } /** - * @return string|null + * @return null | string */ public function getSlaCommitment() : ?string { @@ -427,17 +427,17 @@ public function hasSlaCommitment() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -453,17 +453,17 @@ public function hasComment() : bool } /** - * @param string $onBehalfOf + * @param null | string $onBehalfOf * @return $this */ - public function setOnBehalfOf(string $onBehalfOf) : static + public function setOnBehalfOf(?string $onBehalfOf) : static { $this->onBehalfOf = $onBehalfOf; return $this; } /** - * @return string|null + * @return null | string */ public function getOnBehalfOf() : ?string { @@ -479,19 +479,19 @@ public function hasOnBehalfOf() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo + * @param null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' $accessibleTo * @return $this */ - public function setAccessibleTo(\OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo) : static + public function setAccessibleTo(?string $accessibleTo) : static { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\AccessLevel|null + * @return null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' */ - public function getAccessibleTo() : ?\OpenEuropa\EPoetry\Request\Type\AccessLevel + public function getAccessibleTo() : ?string { return $this->accessibleTo; } @@ -505,17 +505,17 @@ public function hasAccessibleTo() : bool } /** - * @param string $keyword1 + * @param null | string $keyword1 * @return $this */ - public function setKeyword1(string $keyword1) : static + public function setKeyword1(?string $keyword1) : static { $this->keyword1 = $keyword1; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword1() : ?string { @@ -531,17 +531,17 @@ public function hasKeyword1() : bool } /** - * @param string $keyword2 + * @param null | string $keyword2 * @return $this */ - public function setKeyword2(string $keyword2) : static + public function setKeyword2(?string $keyword2) : static { $this->keyword2 = $keyword2; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword2() : ?string { @@ -557,17 +557,17 @@ public function hasKeyword2() : bool } /** - * @param string $keyword3 + * @param null | string $keyword3 * @return $this */ - public function setKeyword3(string $keyword3) : static + public function setKeyword3(?string $keyword3) : static { $this->keyword3 = $keyword3; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword3() : ?string { @@ -593,9 +593,9 @@ public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) } /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null + * @return \OpenEuropa\EPoetry\Request\Type\Contacts */ - public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts + public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts { return $this->contacts; } @@ -619,9 +619,9 @@ public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDoc } /** - * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn|null + * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn */ - public function getOriginalDocument() : ?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function getOriginalDocument() : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { return $this->originalDocument; } @@ -645,9 +645,9 @@ public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) } /** - * @return \OpenEuropa\EPoetry\Request\Type\Products|null + * @return \OpenEuropa\EPoetry\Request\Type\Products */ - public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products + public function getProducts() : \OpenEuropa\EPoetry\Request\Type\Products { return $this->products; } @@ -661,17 +661,17 @@ public function hasProducts() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { diff --git a/src/Request/Type/RequestDetailsOut.php b/src/Request/Type/RequestDetailsOut.php index 2ad20ecc..75be916d 100644 --- a/src/Request/Type/RequestDetailsOut.php +++ b/src/Request/Type/RequestDetailsOut.php @@ -5,29 +5,29 @@ class RequestDetailsOut { /** - * @var string + * @var null | string */ - private $title; + private $title = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\WorkflowCode + * @var null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' */ - private $workflowCode; + private $workflowCode = null; /** - * @var string + * @var null | string */ - private $internalReference; + private $internalReference = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $requestedDeadline; + private $requestedDeadline = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $acceptedDeadline; + private $acceptedDeadline = null; /** * @var bool @@ -45,107 +45,107 @@ class RequestDetailsOut private $documentToAdopt; /** - * @var string + * @var null | string */ - private $decideReference; + private $decideReference = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Destination + * @var null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' */ - private $destination; + private $destination = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Procedure + * @var null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' */ - private $procedure; + private $procedure = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\SlaAnnex + * @var null | 'ANNEX8A' | 'ANNEX8B' | 'NO' */ - private $slaAnnex; + private $slaAnnex = null; /** - * @var string + * @var null | string */ - private $slaCommitment; + private $slaCommitment = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var string + * @var null | string */ - private $onBehalfOf; + private $onBehalfOf = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\AccessLevel + * @var null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' */ - private $accessibleTo; + private $accessibleTo = null; /** - * @var string + * @var null | string */ - private $keyword1; + private $keyword1 = null; /** - * @var string + * @var null | string */ - private $keyword2; + private $keyword2 = null; /** - * @var string + * @var null | string */ - private $keyword3; + private $keyword3 = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\RequestStatus + * @var null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' */ - private $status; + private $status = null; /** - * @var string + * @var null | string */ - private $rejectMessage; + private $rejectMessage = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Contacts + * @var null | \OpenEuropa\EPoetry\Request\Type\Contacts */ - private $contacts; + private $contacts = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + * @var null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut */ - private $originalDocument; + private $originalDocument = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Products + * @var null | \OpenEuropa\EPoetry\Request\Type\Products */ - private $products; + private $products = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments + * @var null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments */ - private $auxiliaryDocuments; + private $auxiliaryDocuments = null; /** - * @param string $title + * @param null | string $title * @return $this */ - public function setTitle(string $title) : static + public function setTitle(?string $title) : static { $this->title = $title; return $this; } /** - * @return string|null + * @return null | string */ public function getTitle() : ?string { @@ -161,19 +161,19 @@ public function hasTitle() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode + * @param null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' $workflowCode * @return $this */ - public function setWorkflowCode(\OpenEuropa\EPoetry\Request\Type\WorkflowCode $workflowCode) : static + public function setWorkflowCode(?string $workflowCode) : static { $this->workflowCode = $workflowCode; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\WorkflowCode|null + * @return null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' */ - public function getWorkflowCode() : ?\OpenEuropa\EPoetry\Request\Type\WorkflowCode + public function getWorkflowCode() : ?string { return $this->workflowCode; } @@ -187,17 +187,17 @@ public function hasWorkflowCode() : bool } /** - * @param string $internalReference + * @param null | string $internalReference * @return $this */ - public function setInternalReference(string $internalReference) : static + public function setInternalReference(?string $internalReference) : static { $this->internalReference = $internalReference; return $this; } /** - * @return string|null + * @return null | string */ public function getInternalReference() : ?string { @@ -213,17 +213,17 @@ public function hasInternalReference() : bool } /** - * @param \DateTimeInterface $requestedDeadline + * @param null | \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -239,17 +239,17 @@ public function hasRequestedDeadline() : bool } /** - * @param \DateTimeInterface $acceptedDeadline + * @param null | \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -275,9 +275,9 @@ public function setSensitive(bool $sensitive) : static } /** - * @return bool|null + * @return bool */ - public function isSensitive() : ?bool + public function isSensitive() : bool { return $this->sensitive; } @@ -301,9 +301,9 @@ public function setSentViaRue(bool $sentViaRue) : static } /** - * @return bool|null + * @return bool */ - public function isSentViaRue() : ?bool + public function isSentViaRue() : bool { return $this->sentViaRue; } @@ -327,9 +327,9 @@ public function setDocumentToAdopt(bool $documentToAdopt) : static } /** - * @return bool|null + * @return bool */ - public function isDocumentToAdopt() : ?bool + public function isDocumentToAdopt() : bool { return $this->documentToAdopt; } @@ -343,17 +343,17 @@ public function hasDocumentToAdopt() : bool } /** - * @param string $decideReference + * @param null | string $decideReference * @return $this */ - public function setDecideReference(string $decideReference) : static + public function setDecideReference(?string $decideReference) : static { $this->decideReference = $decideReference; return $this; } /** - * @return string|null + * @return null | string */ public function getDecideReference() : ?string { @@ -369,19 +369,19 @@ public function hasDecideReference() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Destination $destination + * @param null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' $destination * @return $this */ - public function setDestination(\OpenEuropa\EPoetry\Request\Type\Destination $destination) : static + public function setDestination(?string $destination) : static { $this->destination = $destination; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Destination|null + * @return null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' */ - public function getDestination() : ?\OpenEuropa\EPoetry\Request\Type\Destination + public function getDestination() : ?string { return $this->destination; } @@ -395,19 +395,19 @@ public function hasDestination() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Procedure $procedure + * @param null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' $procedure * @return $this */ - public function setProcedure(\OpenEuropa\EPoetry\Request\Type\Procedure $procedure) : static + public function setProcedure(?string $procedure) : static { $this->procedure = $procedure; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Procedure|null + * @return null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' */ - public function getProcedure() : ?\OpenEuropa\EPoetry\Request\Type\Procedure + public function getProcedure() : ?string { return $this->procedure; } @@ -421,19 +421,19 @@ public function hasProcedure() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex + * @param null | 'ANNEX8A' | 'ANNEX8B' | 'NO' $slaAnnex * @return $this */ - public function setSlaAnnex(\OpenEuropa\EPoetry\Request\Type\SlaAnnex $slaAnnex) : static + public function setSlaAnnex(?string $slaAnnex) : static { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\SlaAnnex|null + * @return null | 'ANNEX8A' | 'ANNEX8B' | 'NO' */ - public function getSlaAnnex() : ?\OpenEuropa\EPoetry\Request\Type\SlaAnnex + public function getSlaAnnex() : ?string { return $this->slaAnnex; } @@ -447,17 +447,17 @@ public function hasSlaAnnex() : bool } /** - * @param string $slaCommitment + * @param null | string $slaCommitment * @return $this */ - public function setSlaCommitment(string $slaCommitment) : static + public function setSlaCommitment(?string $slaCommitment) : static { $this->slaCommitment = $slaCommitment; return $this; } /** - * @return string|null + * @return null | string */ public function getSlaCommitment() : ?string { @@ -473,17 +473,17 @@ public function hasSlaCommitment() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -499,17 +499,17 @@ public function hasComment() : bool } /** - * @param string $onBehalfOf + * @param null | string $onBehalfOf * @return $this */ - public function setOnBehalfOf(string $onBehalfOf) : static + public function setOnBehalfOf(?string $onBehalfOf) : static { $this->onBehalfOf = $onBehalfOf; return $this; } /** - * @return string|null + * @return null | string */ public function getOnBehalfOf() : ?string { @@ -525,19 +525,19 @@ public function hasOnBehalfOf() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo + * @param null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' $accessibleTo * @return $this */ - public function setAccessibleTo(\OpenEuropa\EPoetry\Request\Type\AccessLevel $accessibleTo) : static + public function setAccessibleTo(?string $accessibleTo) : static { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\AccessLevel|null + * @return null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' */ - public function getAccessibleTo() : ?\OpenEuropa\EPoetry\Request\Type\AccessLevel + public function getAccessibleTo() : ?string { return $this->accessibleTo; } @@ -551,17 +551,17 @@ public function hasAccessibleTo() : bool } /** - * @param string $keyword1 + * @param null | string $keyword1 * @return $this */ - public function setKeyword1(string $keyword1) : static + public function setKeyword1(?string $keyword1) : static { $this->keyword1 = $keyword1; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword1() : ?string { @@ -577,17 +577,17 @@ public function hasKeyword1() : bool } /** - * @param string $keyword2 + * @param null | string $keyword2 * @return $this */ - public function setKeyword2(string $keyword2) : static + public function setKeyword2(?string $keyword2) : static { $this->keyword2 = $keyword2; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword2() : ?string { @@ -603,17 +603,17 @@ public function hasKeyword2() : bool } /** - * @param string $keyword3 + * @param null | string $keyword3 * @return $this */ - public function setKeyword3(string $keyword3) : static + public function setKeyword3(?string $keyword3) : static { $this->keyword3 = $keyword3; return $this; } /** - * @return string|null + * @return null | string */ public function getKeyword3() : ?string { @@ -629,19 +629,19 @@ public function hasKeyword3() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\RequestStatus $status + * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status * @return $this */ - public function setStatus(\OpenEuropa\EPoetry\Request\Type\RequestStatus $status) : static + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\RequestStatus|null + * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' */ - public function getStatus() : ?\OpenEuropa\EPoetry\Request\Type\RequestStatus + public function getStatus() : ?string { return $this->status; } @@ -655,17 +655,17 @@ public function hasStatus() : bool } /** - * @param string $rejectMessage + * @param null | string $rejectMessage * @return $this */ - public function setRejectMessage(string $rejectMessage) : static + public function setRejectMessage(?string $rejectMessage) : static { $this->rejectMessage = $rejectMessage; return $this; } /** - * @return string|null + * @return null | string */ public function getRejectMessage() : ?string { @@ -681,17 +681,17 @@ public function hasRejectMessage() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { @@ -707,17 +707,17 @@ public function hasApplicationName() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts + * @param null | \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static + public function setContacts(?\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static { $this->contacts = $contacts; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null + * @return null | \OpenEuropa\EPoetry\Request\Type\Contacts */ public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts { @@ -733,17 +733,17 @@ public function hasContacts() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument + * @param null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument * @return $this */ - public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : static + public function setOriginalDocument(?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : static { $this->originalDocument = $originalDocument; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut */ public function getOriginalDocument() : ?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { @@ -759,17 +759,17 @@ public function hasOriginalDocument() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Products $products + * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static + public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static { $this->products = $products; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Products|null + * @return null | \OpenEuropa\EPoetry\Request\Type\Products */ public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products { @@ -785,17 +785,17 @@ public function hasProducts() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments + * @param null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : static { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments|null + * @return null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments { diff --git a/src/Request/Type/RequestReference.php b/src/Request/Type/RequestReference.php new file mode 100644 index 00000000..cc027e8a --- /dev/null +++ b/src/Request/Type/RequestReference.php @@ -0,0 +1,100 @@ +dossier = $dossier; + return $this; + } + + /** + * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference + */ + public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference + { + return $this->dossier; + } + + /** + * @return bool + */ + public function hasDossier() : bool + { + return !empty($this->dossier); + } + + /** + * @param null | string $productType + * @return $this + */ + public function setProductType(?string $productType) : static + { + $this->productType = $productType; + return $this; + } + + /** + * @return null | string + */ + public function getProductType() : ?string + { + return $this->productType; + } + + /** + * @return bool + */ + public function hasProductType() : bool + { + return !empty($this->productType); + } + + /** + * @param null | int $part + * @return $this + */ + public function setPart(?int $part) : static + { + $this->part = $part; + return $this; + } + + /** + * @return null | int + */ + public function getPart() : ?int + { + return $this->part; + } + + /** + * @return bool + */ + public function hasPart() : bool + { + return !empty($this->part); + } +} + diff --git a/src/Request/Type/RequestReferenceIn.php b/src/Request/Type/RequestReferenceIn.php index 4e31b953..f8fe689b 100644 --- a/src/Request/Type/RequestReferenceIn.php +++ b/src/Request/Type/RequestReferenceIn.php @@ -5,32 +5,32 @@ class RequestReferenceIn { /** - * @var \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier; + private $dossier = null; /** - * @var string + * @var null | string */ - private $productType; + private $productType = null; /** - * @var int + * @var null | int */ - private $part; + private $part = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -46,17 +46,17 @@ public function hasDossier() : bool } /** - * @param string $productType + * @param null | string $productType * @return $this */ - public function setProductType(string $productType) : static + public function setProductType(?string $productType) : static { $this->productType = $productType; return $this; } /** - * @return string|null + * @return null | string */ public function getProductType() : ?string { @@ -72,17 +72,17 @@ public function hasProductType() : bool } /** - * @param int $part + * @param null | int $part * @return $this */ - public function setPart(int $part) : static + public function setPart(?int $part) : static { $this->part = $part; return $this; } /** - * @return int|null + * @return null | int */ public function getPart() : ?int { diff --git a/src/Request/Type/RequestReferenceOut.php b/src/Request/Type/RequestReferenceOut.php index 4aa90df8..2c1e7013 100644 --- a/src/Request/Type/RequestReferenceOut.php +++ b/src/Request/Type/RequestReferenceOut.php @@ -5,37 +5,37 @@ class RequestReferenceOut { /** - * @var \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier; + private $dossier = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\ProductServiceType + * @var null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' */ - private $productType; + private $productType = null; /** - * @var int + * @var null | int */ - private $part; + private $part = null; /** - * @var int + * @var null | int */ - private $version; + private $version = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static { $this->dossier = $dossier; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null + * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -51,19 +51,19 @@ public function hasDossier() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\ProductServiceType $productType + * @param null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' $productType * @return $this */ - public function setProductType(\OpenEuropa\EPoetry\Request\Type\ProductServiceType $productType) : static + public function setProductType(?string $productType) : static { $this->productType = $productType; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\ProductServiceType|null + * @return null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' */ - public function getProductType() : ?\OpenEuropa\EPoetry\Request\Type\ProductServiceType + public function getProductType() : ?string { return $this->productType; } @@ -77,17 +77,17 @@ public function hasProductType() : bool } /** - * @param int $part + * @param null | int $part * @return $this */ - public function setPart(int $part) : static + public function setPart(?int $part) : static { $this->part = $part; return $this; } /** - * @return int|null + * @return null | int */ public function getPart() : ?int { @@ -103,17 +103,17 @@ public function hasPart() : bool } /** - * @param int $version + * @param null | int $version * @return $this */ - public function setVersion(int $version) : static + public function setVersion(?int $version) : static { $this->version = $version; return $this; } /** - * @return int|null + * @return null | int */ public function getVersion() : ?int { diff --git a/src/Request/Type/ResubmitRequest.php b/src/Request/Type/ResubmitRequest.php index 4aa36a63..5404511a 100644 --- a/src/Request/Type/ResubmitRequest.php +++ b/src/Request/Type/ResubmitRequest.php @@ -7,32 +7,32 @@ class ResubmitRequest implements RequestInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ - private $resubmitRequest; + private $resubmitRequest = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @var string + * @var null | string */ - private $templateName; + private $templateName = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest * @return $this */ - public function setResubmitRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : static + public function setResubmitRequest(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : static { $this->resubmitRequest = $resubmitRequest; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ public function getResubmitRequest() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { @@ -48,17 +48,17 @@ public function hasResubmitRequest() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { @@ -74,17 +74,17 @@ public function hasApplicationName() : bool } /** - * @param string $templateName + * @param null | string $templateName * @return $this */ - public function setTemplateName(string $templateName) : static + public function setTemplateName(?string $templateName) : static { $this->templateName = $templateName; return $this; } /** - * @return string|null + * @return null | string */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/ResubmitRequestResponse.php b/src/Request/Type/ResubmitRequestResponse.php index 5625d457..9282e538 100644 --- a/src/Request/Type/ResubmitRequestResponse.php +++ b/src/Request/Type/ResubmitRequestResponse.php @@ -7,22 +7,22 @@ class ResubmitRequestResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/SrcDocumentIn.php b/src/Request/Type/SrcDocumentIn.php index 3de52aa2..a1e6d464 100644 --- a/src/Request/Type/SrcDocumentIn.php +++ b/src/Request/Type/SrcDocumentIn.php @@ -5,32 +5,32 @@ class SrcDocumentIn { /** - * @var string + * @var null | string */ - private $fileName; + private $fileName = null; /** - * @var string + * @var null | string */ - private $comment; + private $comment = null; /** - * @var \OpenEuropa\EPoetry\Request\Type\Base64Binary + * @var null | mixed */ - private $content; + private $content = null; /** - * @param string $fileName + * @param null | string $fileName * @return $this */ - public function setFileName(string $fileName) : static + public function setFileName(?string $fileName) : static { $this->fileName = $fileName; return $this; } /** - * @return string|null + * @return null | string */ public function getFileName() : ?string { @@ -46,17 +46,17 @@ public function hasFileName() : bool } /** - * @param string $comment + * @param null | string $comment * @return $this */ - public function setComment(string $comment) : static + public function setComment(?string $comment) : static { $this->comment = $comment; return $this; } /** - * @return string|null + * @return null | string */ public function getComment() : ?string { @@ -72,19 +72,19 @@ public function hasComment() : bool } /** - * @param \OpenEuropa\EPoetry\Request\Type\Base64Binary $content + * @param null | mixed $content * @return $this */ - public function setContent(\OpenEuropa\EPoetry\Request\Type\Base64Binary $content) : static + public function setContent(mixed $content) : static { $this->content = $content; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Base64Binary|null + * @return null | mixed */ - public function getContent() : ?\OpenEuropa\EPoetry\Request\Type\Base64Binary + public function getContent() : mixed { return $this->content; } diff --git a/src/Request/Type/TraxDocuments.php b/src/Request/Type/TraxDocuments.php index fdf90142..b8d5dd00 100644 --- a/src/Request/Type/TraxDocuments.php +++ b/src/Request/Type/TraxDocuments.php @@ -5,12 +5,12 @@ class TraxDocuments { /** - * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array + * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ private $document = []; /** - * @param DocumentIn[] $document + * @param array, DocumentIn[]> $document * @return $this */ public function setDocument(array $document) : static @@ -20,7 +20,7 @@ public function setDocument(array $document) : static } /** - * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null + * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> */ public function getDocument() : ?array { diff --git a/src/Request/Type/UnsupportedEncodingException.php b/src/Request/Type/UnsupportedEncodingException.php index db181edb..c5cfdd4f 100644 --- a/src/Request/Type/UnsupportedEncodingException.php +++ b/src/Request/Type/UnsupportedEncodingException.php @@ -5,22 +5,22 @@ class UnsupportedEncodingException { /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : static + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrl.php b/src/Request/Type/UpdateCallbackUrl.php index ad0f5e31..dc16841e 100644 --- a/src/Request/Type/UpdateCallbackUrl.php +++ b/src/Request/Type/UpdateCallbackUrl.php @@ -7,27 +7,27 @@ class UpdateCallbackUrl implements RequestInterface { /** - * @var string + * @var null | string */ - private $callbackUrl; + private $callbackUrl = null; /** - * @var string + * @var null | string */ - private $applicationName; + private $applicationName = null; /** - * @param string $callbackUrl + * @param null | string $callbackUrl * @return $this */ - public function setCallbackUrl(string $callbackUrl) : static + public function setCallbackUrl(?string $callbackUrl) : static { $this->callbackUrl = $callbackUrl; return $this; } /** - * @return string|null + * @return null | string */ public function getCallbackUrl() : ?string { @@ -43,17 +43,17 @@ public function hasCallbackUrl() : bool } /** - * @param string $applicationName + * @param null | string $applicationName * @return $this */ - public function setApplicationName(string $applicationName) : static + public function setApplicationName(?string $applicationName) : static { $this->applicationName = $applicationName; return $this; } /** - * @return string|null + * @return null | string */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrlOut.php b/src/Request/Type/UpdateCallbackUrlOut.php index 53ab00cd..15ff75b1 100644 --- a/src/Request/Type/UpdateCallbackUrlOut.php +++ b/src/Request/Type/UpdateCallbackUrlOut.php @@ -10,24 +10,24 @@ class UpdateCallbackUrlOut private $success; /** - * @var string + * @var null | string */ - private $oldCallbackUrl; + private $oldCallbackUrl = null; /** - * @var string + * @var null | string */ - private $newCallbackUrl; + private $newCallbackUrl = null; /** - * @var string + * @var null | string */ - private $application; + private $application = null; /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** * @param bool $success @@ -40,9 +40,9 @@ public function setSuccess(bool $success) : static } /** - * @return bool|null + * @return bool */ - public function isSuccess() : ?bool + public function isSuccess() : bool { return $this->success; } @@ -56,17 +56,17 @@ public function hasSuccess() : bool } /** - * @param string $oldCallbackUrl + * @param null | string $oldCallbackUrl * @return $this */ - public function setOldCallbackUrl(string $oldCallbackUrl) : static + public function setOldCallbackUrl(?string $oldCallbackUrl) : static { $this->oldCallbackUrl = $oldCallbackUrl; return $this; } /** - * @return string|null + * @return null | string */ public function getOldCallbackUrl() : ?string { @@ -82,17 +82,17 @@ public function hasOldCallbackUrl() : bool } /** - * @param string $newCallbackUrl + * @param null | string $newCallbackUrl * @return $this */ - public function setNewCallbackUrl(string $newCallbackUrl) : static + public function setNewCallbackUrl(?string $newCallbackUrl) : static { $this->newCallbackUrl = $newCallbackUrl; return $this; } /** - * @return string|null + * @return null | string */ public function getNewCallbackUrl() : ?string { @@ -108,17 +108,17 @@ public function hasNewCallbackUrl() : bool } /** - * @param string $application + * @param null | string $application * @return $this */ - public function setApplication(string $application) : static + public function setApplication(?string $application) : static { $this->application = $application; return $this; } /** - * @return string|null + * @return null | string */ public function getApplication() : ?string { @@ -134,17 +134,17 @@ public function hasApplication() : bool } /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : static + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrlResponse.php b/src/Request/Type/UpdateCallbackUrlResponse.php index 1fa69cb1..90044de6 100644 --- a/src/Request/Type/UpdateCallbackUrlResponse.php +++ b/src/Request/Type/UpdateCallbackUrlResponse.php @@ -7,22 +7,22 @@ class UpdateCallbackUrlResponse implements ResultInterface { /** - * @var \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + * @var null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return + * @param null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : static + public function setReturn(?\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut|null + * @return null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { From 2fecd19ca087a5abe03bfc5c9ca81d310df39bbf Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Tue, 21 Jan 2025 13:56:31 +0100 Subject: [PATCH 05/14] EWPP-4991: Add back getReference(). --- config/soap-client-notification.php | 3 +++ src/Notification/Type/RequestReference.php | 21 +++++++++++++++++++ .../Assembler/ArrayGetterAssemblerTest.php | 7 +++---- .../Notification/NotificationHandlerTest.php | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/config/soap-client-notification.php b/config/soap-client-notification.php index fa2bc451..64afd6bc 100644 --- a/config/soap-client-notification.php +++ b/config/soap-client-notification.php @@ -2,7 +2,10 @@ use OpenEuropa\EPoetry\CodeGenerator\ConfigProcessor; use Phpro\SoapClient\CodeGenerator\Config\Config; +use Phpro\SoapClient\CodeGenerator\Rules\RuleSet; use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory; +use Phpro\SoapClient\CodeGenerator\Rules; +use Phpro\SoapClient\CodeGenerator\Assembler; $engine = CodeGeneratorEngineFactory::create('./resources/notification.wsdl'); $config = Config::create() diff --git a/src/Notification/Type/RequestReference.php b/src/Notification/Type/RequestReference.php index e7bdb9c0..a6ca1ff4 100644 --- a/src/Notification/Type/RequestReference.php +++ b/src/Notification/Type/RequestReference.php @@ -189,5 +189,26 @@ public function hasProductType() : bool { return !empty($this->productType); } + + /** + * Format request reference. + * + * @return string + */ + public function getReference(): string + { + $parts = [ + $this->getRequesterCode(), + $this->getYear(), + $this->getNumber(), + '('.$this->getVersion().')', + $this->getPart(), + $this->getProductType(), + ]; + $parts = array_filter($parts, function ($part) { + return $part !== null; + }); + return implode('-', $parts); + } } diff --git a/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php b/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php index 65009e1d..8076c95f 100644 --- a/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php +++ b/tests/CodeGenerator/Assembler/ArrayGetterAssemblerTest.php @@ -46,7 +46,7 @@ public function testItAssemble() class MyType { /** - * @return string[]|array|null + * @return string[]|array */ public function getProp1() : ?array { @@ -64,9 +64,8 @@ public function getProp1() : ?array */ protected function assemble(ContextInterface $context) { - $originalAssembler = new NullableGetterAssembler(NullableGetterAssemblerOptions::create() - ->withReturnType() - ->withReturnNull()); + $originalAssembler = new GetterAssembler(GetterAssemblerOptions::create() + ->withReturnType()); $originalAssembler->assemble($context); $this->assembler->assemble($context); } diff --git a/tests/Notification/NotificationHandlerTest.php b/tests/Notification/NotificationHandlerTest.php index f82d59c8..d27c5c1a 100644 --- a/tests/Notification/NotificationHandlerTest.php +++ b/tests/Notification/NotificationHandlerTest.php @@ -135,7 +135,7 @@ public function testProductStatusChangeEventsWithDeadline(string $class, string $this->assertInstanceOf(Product::class, $event->getProduct()); $this->assertEquals($status, $event->getProduct()->getStatus()); $this->assertInstanceOf(\DateTimeInterface::class, $event->getAcceptedDeadline()); - $this->assertEquals('Mon, 04 Apr 22 10:51:00 +0000', $event->getAcceptedDeadline()->format(\DATE_RFC822)); + $this->assertEquals(strtotime('Mon, 04 Apr 22 10:51:00 +0000'), $event->getAcceptedDeadline()->getTimestamp()); $this->assertEquals(false, $event->getProduct()->hasFile()); $this->assertEquals(false, $event->getProduct()->hasFormat()); $this->assertEquals(false, $event->getProduct()->hasName()); From ed0f407112e234f2f0e4297d77bd90636011b3f8 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 09:12:38 +0100 Subject: [PATCH 06/14] EWPP-4991: Do not return config object in processor and revert test. --- config/soap-client-notification.php | 3 ++- config/soap-client-request.php | 4 ++-- src/CodeGenerator/ConfigProcessor.php | 14 ++++++-------- tests/Notification/NotificationHandlerTest.php | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/config/soap-client-notification.php b/config/soap-client-notification.php index 64afd6bc..6485791a 100644 --- a/config/soap-client-notification.php +++ b/config/soap-client-notification.php @@ -19,4 +19,5 @@ ->setClassMapNamespace('OpenEuropa\EPoetry\Notification') ; -return ConfigProcessor::addRules($config); +ConfigProcessor::addRules($config); +return $config; diff --git a/config/soap-client-request.php b/config/soap-client-request.php index 5297132d..12e7022c 100644 --- a/config/soap-client-request.php +++ b/config/soap-client-request.php @@ -16,7 +16,7 @@ ->setClassMapName('RequestClassmap') ->setClassMapNamespace('OpenEuropa\EPoetry\Request'); -$config = ConfigProcessor::addRules($config, [ +ConfigProcessor::addRules($config, [ 'LinguisticSections' => ['linguisticSection'], 'Contacts' => ['contact'], 'Products' => ['product'], @@ -26,7 +26,7 @@ 'PrtDocuments' => ['document'], 'InformativeMessages' => ['message'] ]); -$config = ConfigProcessor::addConstructorRule($config, [ +ConfigProcessor::addConstructorRule($config, [ 'ContactPersonIn', 'ContactPersonOut', 'LinguisticSectionOut', diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 9401e10a..883c4964 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -24,10 +24,9 @@ class ConfigProcessor * @param array $overridePropertyTypes * Override specific property types when generating classes. * - * @return \Phpro\SoapClient\CodeGenerator\Config\Config - * Configuration object instance. + * @return void */ - public static function addRules(Config $config, array $specialClassesAndProperties = [], array $overridePropertyTypes = []): Config + public static function addRules(Config $config, array $specialClassesAndProperties = [], array $overridePropertyTypes = []) { // Set all property visibility to "protected". // We have to do this as the SOAP handler will erroneously create duplicate @@ -77,7 +76,7 @@ public static function addRules(Config $config, array $specialClassesAndProperti $hasPropertyAssembler = new OpenEuropa\Assembler\HasPropertyAssembler(); - return $config + $config // // Add the ResultInterface to classes that match given regex. // ->addRule( // new Rules\TypenameMatchesRule( @@ -88,7 +87,7 @@ public static function addRules(Config $config, array $specialClassesAndProperti // Set the default property assembler and generate all properties. ->addRule(new Rules\AssembleRule($defaultPropertyAssembler)) // Update properties and set them as 'nullable' - ->addRule(new Rules\AssembleRule($arrayPropertyAssembler)) +// ->addRule(new Rules\AssembleRule($arrayPropertyAssembler)) // Update properties and update only some of them. ->addRule(new Rules\AssembleRule($defaultSetterAssembler)) // Update setters and update only some of them. @@ -141,12 +140,11 @@ public static function addRules(Config $config, array $specialClassesAndProperti * @param array $classes * Array of class names, without their namespace. * - * @return \Phpro\SoapClient\CodeGenerator\Config\Config - * Configuration object. + * @return void */ public static function addConstructorRule(Config $config, array $classes) { - return $config + $config ->addRule(new Rules\TypenameMatchesRule( new Rules\AssembleRule( new Assembler\ConstructorAssembler( diff --git a/tests/Notification/NotificationHandlerTest.php b/tests/Notification/NotificationHandlerTest.php index d27c5c1a..f82d59c8 100644 --- a/tests/Notification/NotificationHandlerTest.php +++ b/tests/Notification/NotificationHandlerTest.php @@ -135,7 +135,7 @@ public function testProductStatusChangeEventsWithDeadline(string $class, string $this->assertInstanceOf(Product::class, $event->getProduct()); $this->assertEquals($status, $event->getProduct()->getStatus()); $this->assertInstanceOf(\DateTimeInterface::class, $event->getAcceptedDeadline()); - $this->assertEquals(strtotime('Mon, 04 Apr 22 10:51:00 +0000'), $event->getAcceptedDeadline()->getTimestamp()); + $this->assertEquals('Mon, 04 Apr 22 10:51:00 +0000', $event->getAcceptedDeadline()->format(\DATE_RFC822)); $this->assertEquals(false, $event->getProduct()->hasFile()); $this->assertEquals(false, $event->getProduct()->hasFormat()); $this->assertEquals(false, $event->getProduct()->hasName()); From 517513481f06fee9e7e43a4ecd714845700a2083 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 09:17:36 +0100 Subject: [PATCH 07/14] EWPP-4991: Restore generated code to 2.x version. --- .../ClientCertificateClassmap.php | 1 - .../ClientCertificateClient.php | 12 +- .../Type/GetServiceTicket.php | 16 +- .../Type/GetServiceTicketResponse.php | 11 +- src/Notification/NotificationClassmap.php | 1 - src/Notification/Type/DgtNotification.php | 60 ++--- .../Type/DgtNotificationResult.php | 16 +- src/Notification/Type/LinguisticRequest.php | 20 +- src/Notification/Type/Product.php | 62 ++--- src/Notification/Type/ProductReference.php | 20 +- src/Notification/Type/ReceiveNotification.php | 10 +- .../Type/ReceiveNotificationResponse.php | 10 +- src/Notification/Type/RequestReference.php | 44 ++-- src/Request/RequestClassmap.php | 10 - src/Request/RequestClient.php | 89 ++----- src/Request/Type/AddNewPartToDossier.php | 40 +-- .../Type/AddNewPartToDossierResponse.php | 10 +- src/Request/Type/AuxiliaryDocumentOut.php | 50 ++-- src/Request/Type/AuxiliaryDocuments.php | 10 +- src/Request/Type/AuxiliaryDocumentsIn.php | 50 ++-- src/Request/Type/ContactPerson.php | 162 ------------ src/Request/Type/ContactPersonIn.php | 20 +- src/Request/Type/ContactPersonOut.php | 62 ++--- src/Request/Type/Contacts.php | 10 +- src/Request/Type/CorrectionDetailsIn.php | 62 ++--- src/Request/Type/CorrectionReferenceIn.php | 10 +- src/Request/Type/CorrectionRequestOut.php | 20 +- src/Request/Type/CreateCorrectionRequest.php | 20 +- .../Type/CreateCorrectionRequestResponse.php | 10 +- src/Request/Type/CreateLinguisticRequest.php | 30 +-- .../Type/CreateLinguisticRequestResponse.php | 10 +- src/Request/Type/CreateNewVersion.php | 20 +- src/Request/Type/CreateNewVersionResponse.php | 10 +- src/Request/Type/DCO.php | 224 ---------------- src/Request/Type/DcoOut.php | 70 ++--- src/Request/Type/DocumentIn.php | 42 +-- src/Request/Type/Dossier.php | 100 ------- src/Request/Type/DossierReference.php | 30 +-- src/Request/Type/GetLinguisticRequest.php | 20 +- .../Type/GetLinguisticRequestResponse.php | 10 +- src/Request/Type/InformativeMessages.php | 8 +- src/Request/Type/LinguisticRequestIn.php | 20 +- src/Request/Type/LinguisticRequestOut.php | 30 +-- src/Request/Type/LinguisticSection.php | 38 --- src/Request/Type/LinguisticSectionIn.php | 12 +- src/Request/Type/LinguisticSectionOut.php | 14 +- src/Request/Type/LinguisticSections.php | 10 +- src/Request/Type/LinquisticRequest.php | 100 ------- .../Type/ModifyAuxiliaryDocumentsIn.php | 40 +-- src/Request/Type/ModifyLinguisticRequest.php | 20 +- .../Type/ModifyLinguisticRequestIn.php | 20 +- .../Type/ModifyLinguisticRequestResponse.php | 10 +- src/Request/Type/ModifyProductRequestIn.php | 22 +- src/Request/Type/ModifyRequestDetailsIn.php | 26 +- src/Request/Type/ModifyRequestReferenceIn.php | 30 +-- src/Request/Type/NoSuchMethodException.php | 10 +- src/Request/Type/OriginalDocument.php | 193 -------------- src/Request/Type/OriginalDocumentIn.php | 44 ++-- src/Request/Type/OriginalDocumentOut.php | 56 ++-- src/Request/Type/Product.php | 100 ------- src/Request/Type/ProductRequestIn.php | 26 +- src/Request/Type/ProductRequestOut.php | 56 ++-- src/Request/Type/Products.php | 10 +- src/Request/Type/PrtDocuments.php | 8 +- src/Request/Type/ReferenceDocuments.php | 8 +- src/Request/Type/RequestDetails.php | 100 ------- src/Request/Type/RequestDetailsIn.php | 204 +++++++------- src/Request/Type/RequestDetailsOut.php | 248 +++++++++--------- src/Request/Type/RequestReference.php | 100 ------- src/Request/Type/RequestReferenceIn.php | 30 +-- src/Request/Type/RequestReferenceOut.php | 40 +-- src/Request/Type/ResubmitRequest.php | 30 +-- src/Request/Type/ResubmitRequestResponse.php | 10 +- src/Request/Type/SrcDocumentIn.php | 32 +-- src/Request/Type/TraxDocuments.php | 8 +- .../Type/UnsupportedEncodingException.php | 10 +- src/Request/Type/UpdateCallbackUrl.php | 20 +- src/Request/Type/UpdateCallbackUrlOut.php | 46 ++-- .../Type/UpdateCallbackUrlResponse.php | 10 +- 79 files changed, 1046 insertions(+), 2237 deletions(-) delete mode 100644 src/Request/Type/ContactPerson.php delete mode 100644 src/Request/Type/DCO.php delete mode 100644 src/Request/Type/Dossier.php delete mode 100644 src/Request/Type/LinguisticSection.php delete mode 100644 src/Request/Type/LinquisticRequest.php delete mode 100644 src/Request/Type/OriginalDocument.php delete mode 100644 src/Request/Type/Product.php delete mode 100644 src/Request/Type/RequestDetails.php delete mode 100644 src/Request/Type/RequestReference.php diff --git a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php index f3c966f7..3a6a3bdf 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php @@ -16,4 +16,3 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } - diff --git a/src/Authentication/ClientCertificate/ClientCertificateClient.php b/src/Authentication/ClientCertificate/ClientCertificateClient.php index 57091ed6..c7155823 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClient.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClient.php @@ -21,18 +21,12 @@ public function __construct(\Phpro\SoapClient\Caller\Caller $caller) } /** - * @param RequestInterface & Type\GetServiceTicket $getServiceTicketPart - * @return ResultInterface & Type\GetServiceTicketResponse + * @param RequestInterface|Type\GetServiceTicket $getServiceTicketPart + * @return ResultInterface|Type\GetServiceTicketResponse * @throws SoapException */ public function getServiceTicket(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicket $getServiceTicketPart) : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse { - $response = ($this->caller)('getServiceTicket', $getServiceTicketPart); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('getServiceTicket', $getServiceTicketPart); } } - diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php index 3e67a8a3..3d727ddd 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php @@ -7,19 +7,16 @@ class GetServiceTicket implements RequestInterface { /** - * The target service for which you want to obtain a service ticket. - * This must be a valid URL. - * * @var string */ - private string $service; + private $service; /** * Constructor * - * @param string $service + * @var string $service */ - public function __construct(string $service) + public function __construct($service) { $this->service = $service; } @@ -27,16 +24,16 @@ public function __construct(string $service) /** * @return string */ - public function getService() : string + public function getService() { return $this->service; } /** * @param string $service - * @return static + * @return GetServiceTicket */ - public function withService(string $service) : static + public function withService($service) { $new = clone $this; $new->service = $service; @@ -44,4 +41,3 @@ public function withService(string $service) : static return $new; } } - diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php index f47cbab7..e711cc34 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php @@ -7,25 +7,23 @@ class GetServiceTicketResponse implements ResultInterface { /** - * Service ticket for the specified service. - * * @var string */ - private string $serviceTicket; + private $serviceTicket; /** * @return string */ - public function getServiceTicket() : string + public function getServiceTicket() { return $this->serviceTicket; } /** * @param string $serviceTicket - * @return static + * @return GetServiceTicketResponse */ - public function withServiceTicket(string $serviceTicket) : static + public function withServiceTicket($serviceTicket) { $new = clone $this; $new->serviceTicket = $serviceTicket; @@ -33,4 +31,3 @@ public function withServiceTicket(string $serviceTicket) : static return $new; } } - diff --git a/src/Notification/NotificationClassmap.php b/src/Notification/NotificationClassmap.php index 86380f6d..84b736e9 100644 --- a/src/Notification/NotificationClassmap.php +++ b/src/Notification/NotificationClassmap.php @@ -22,4 +22,3 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } - diff --git a/src/Notification/Type/DgtNotification.php b/src/Notification/Type/DgtNotification.php index 5eac556c..70c58807 100644 --- a/src/Notification/Type/DgtNotification.php +++ b/src/Notification/Type/DgtNotification.php @@ -5,47 +5,47 @@ class DgtNotification { /** - * @var null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' + * @var string */ - private $notificationType = null; + private $notificationType; /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + * @var \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest */ - private $linguisticRequest = null; + private $linguisticRequest; /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\Product + * @var \OpenEuropa\EPoetry\Notification\Type\Product */ - private $product = null; + private $product; /** - * @var null | string + * @var string */ - private $message = null; + private $message; /** - * @var null | string + * @var string */ - private $planningAgent = null; + private $planningAgent; /** - * @var null | string + * @var string */ - private $planningSector = null; + private $planningSector; /** - * @param null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' $notificationType + * @param string $notificationType * @return $this */ - public function setNotificationType(?string $notificationType) : static + public function setNotificationType(string $notificationType) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->notificationType = $notificationType; return $this; } /** - * @return null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' + * @return string|null */ public function getNotificationType() : ?string { @@ -61,17 +61,17 @@ public function hasNotificationType() : bool } /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest + * @param \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest * @return $this */ - public function setLinguisticRequest(?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : static + public function setLinguisticRequest(\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->linguisticRequest = $linguisticRequest; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + * @return \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest|null */ public function getLinguisticRequest() : ?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest { @@ -87,17 +87,17 @@ public function hasLinguisticRequest() : bool } /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\Product $product + * @param \OpenEuropa\EPoetry\Notification\Type\Product $product * @return $this */ - public function setProduct(?\OpenEuropa\EPoetry\Notification\Type\Product $product) : static + public function setProduct(\OpenEuropa\EPoetry\Notification\Type\Product $product) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->product = $product; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\Product + * @return \OpenEuropa\EPoetry\Notification\Type\Product|null */ public function getProduct() : ?\OpenEuropa\EPoetry\Notification\Type\Product { @@ -113,17 +113,17 @@ public function hasProduct() : bool } /** - * @param null | string $message + * @param string $message * @return $this */ - public function setMessage(?string $message) : static + public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->message = $message; return $this; } /** - * @return null | string + * @return string|null */ public function getMessage() : ?string { @@ -139,17 +139,17 @@ public function hasMessage() : bool } /** - * @param null | string $planningAgent + * @param string $planningAgent * @return $this */ - public function setPlanningAgent(?string $planningAgent) : static + public function setPlanningAgent(string $planningAgent) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->planningAgent = $planningAgent; return $this; } /** - * @return null | string + * @return string|null */ public function getPlanningAgent() : ?string { @@ -165,17 +165,17 @@ public function hasPlanningAgent() : bool } /** - * @param null | string $planningSector + * @param string $planningSector * @return $this */ - public function setPlanningSector(?string $planningSector) : static + public function setPlanningSector(string $planningSector) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification { $this->planningSector = $planningSector; return $this; } /** - * @return null | string + * @return string|null */ public function getPlanningSector() : ?string { diff --git a/src/Notification/Type/DgtNotificationResult.php b/src/Notification/Type/DgtNotificationResult.php index cc6fe898..536fcdb2 100644 --- a/src/Notification/Type/DgtNotificationResult.php +++ b/src/Notification/Type/DgtNotificationResult.php @@ -10,24 +10,24 @@ class DgtNotificationResult private $success; /** - * @var null | string + * @var string */ - private $message = null; + private $message; /** * @param bool $success * @return $this */ - public function setSuccess(bool $success) : static + public function setSuccess(bool $success) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult { $this->success = $success; return $this; } /** - * @return bool + * @return bool|null */ - public function isSuccess() : bool + public function isSuccess() : ?bool { return $this->success; } @@ -41,17 +41,17 @@ public function hasSuccess() : bool } /** - * @param null | string $message + * @param string $message * @return $this */ - public function setMessage(?string $message) : static + public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult { $this->message = $message; return $this; } /** - * @return null | string + * @return string|null */ public function getMessage() : ?string { diff --git a/src/Notification/Type/LinguisticRequest.php b/src/Notification/Type/LinguisticRequest.php index e52bc6f5..054aae0c 100644 --- a/src/Notification/Type/LinguisticRequest.php +++ b/src/Notification/Type/LinguisticRequest.php @@ -5,27 +5,27 @@ class LinguisticRequest { /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference = null; + private $requestReference; /** - * @var null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' + * @var string */ - private $status = null; + private $status; /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' $status + * @param string $status * @return $this */ - public function setStatus(?string $status) : static + public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest { $this->status = $status; return $this; } /** - * @return null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' + * @return string|null */ public function getStatus() : ?string { diff --git a/src/Notification/Type/Product.php b/src/Notification/Type/Product.php index 7a77329d..1d5b6e01 100644 --- a/src/Notification/Type/Product.php +++ b/src/Notification/Type/Product.php @@ -5,47 +5,47 @@ class Product { /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\ProductReference + * @var \OpenEuropa\EPoetry\Notification\Type\ProductReference */ - private $productReference = null; + private $productReference; /** - * @var null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' + * @var string */ - private $status = null; + private $status; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $acceptedDeadline = null; + private $acceptedDeadline; /** - * @var null | mixed + * @var string */ - private $file = null; + private $file; /** - * @var null | string + * @var string */ - private $name = null; + private $name; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference + * @param \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference * @return $this */ - public function setProductReference(?\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : static + public function setProductReference(\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->productReference = $productReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\ProductReference + * @return \OpenEuropa\EPoetry\Notification\Type\ProductReference|null */ public function getProductReference() : ?\OpenEuropa\EPoetry\Notification\Type\ProductReference { @@ -61,17 +61,17 @@ public function hasProductReference() : bool } /** - * @param null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' $status + * @param string $status * @return $this */ - public function setStatus(?string $status) : static + public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->status = $status; return $this; } /** - * @return null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' + * @return string|null */ public function getStatus() : ?string { @@ -87,17 +87,17 @@ public function hasStatus() : bool } /** - * @param null | \DateTimeInterface $acceptedDeadline + * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -113,19 +113,19 @@ public function hasAcceptedDeadline() : bool } /** - * @param null | mixed $file + * @param string $file * @return $this */ - public function setFile(mixed $file) : static + public function setFile(string $file) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->file = $file; return $this; } /** - * @return null | mixed + * @return string|null */ - public function getFile() : mixed + public function getFile() : ?string { return $this->file; } @@ -139,17 +139,17 @@ public function hasFile() : bool } /** - * @param null | string $name + * @param string $name * @return $this */ - public function setName(?string $name) : static + public function setName(string $name) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->name = $name; return $this; } /** - * @return null | string + * @return string|null */ public function getName() : ?string { @@ -165,17 +165,17 @@ public function hasName() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Notification\Type\Product { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { diff --git a/src/Notification/Type/ProductReference.php b/src/Notification/Type/ProductReference.php index b5a74832..c254941f 100644 --- a/src/Notification/Type/ProductReference.php +++ b/src/Notification/Type/ProductReference.php @@ -5,27 +5,27 @@ class ProductReference { /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference = null; + private $requestReference; /** - * @var null | string + * @var string */ - private $language = null; + private $language; /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\ProductReference { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param null | string $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Notification\Type\ProductReference { $this->language = $language; return $this; } /** - * @return null | string + * @return string|null */ public function getLanguage() : ?string { diff --git a/src/Notification/Type/ReceiveNotification.php b/src/Notification/Type/ReceiveNotification.php index c5ac006f..afee45fa 100644 --- a/src/Notification/Type/ReceiveNotification.php +++ b/src/Notification/Type/ReceiveNotification.php @@ -7,22 +7,22 @@ class ReceiveNotification implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification + * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotification */ - private $notification = null; + private $notification; /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification + * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification * @return $this */ - public function setNotification(?\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : static + public function setNotification(\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotification { $this->notification = $notification; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification + * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotification|null */ public function getNotification() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotification { diff --git a/src/Notification/Type/ReceiveNotificationResponse.php b/src/Notification/Type/ReceiveNotificationResponse.php index e8653448..9fc3a261 100644 --- a/src/Notification/Type/ReceiveNotificationResponse.php +++ b/src/Notification/Type/ReceiveNotificationResponse.php @@ -7,22 +7,22 @@ class ReceiveNotificationResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return + * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : static + public function setReturn(\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotificationResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult { diff --git a/src/Notification/Type/RequestReference.php b/src/Notification/Type/RequestReference.php index a6ca1ff4..642e1de8 100644 --- a/src/Notification/Type/RequestReference.php +++ b/src/Notification/Type/RequestReference.php @@ -5,9 +5,9 @@ class RequestReference { /** - * @var null | string + * @var string */ - private $requesterCode = null; + private $requesterCode; /** * @var int @@ -30,22 +30,22 @@ class RequestReference private $version; /** - * @var null | string + * @var string */ - private $productType = null; + private $productType; /** - * @param null | string $requesterCode + * @param string $requesterCode * @return $this */ - public function setRequesterCode(?string $requesterCode) : static + public function setRequesterCode(string $requesterCode) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->requesterCode = $requesterCode; return $this; } /** - * @return null | string + * @return string|null */ public function getRequesterCode() : ?string { @@ -64,16 +64,16 @@ public function hasRequesterCode() : bool * @param int $year * @return $this */ - public function setYear(int $year) : static + public function setYear(int $year) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->year = $year; return $this; } /** - * @return int + * @return int|null */ - public function getYear() : int + public function getYear() : ?int { return $this->year; } @@ -90,16 +90,16 @@ public function hasYear() : bool * @param int $number * @return $this */ - public function setNumber(int $number) : static + public function setNumber(int $number) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->number = $number; return $this; } /** - * @return int + * @return int|null */ - public function getNumber() : int + public function getNumber() : ?int { return $this->number; } @@ -116,16 +116,16 @@ public function hasNumber() : bool * @param int $part * @return $this */ - public function setPart(int $part) : static + public function setPart(int $part) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->part = $part; return $this; } /** - * @return int + * @return int|null */ - public function getPart() : int + public function getPart() : ?int { return $this->part; } @@ -142,16 +142,16 @@ public function hasPart() : bool * @param int $version * @return $this */ - public function setVersion(int $version) : static + public function setVersion(int $version) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->version = $version; return $this; } /** - * @return int + * @return int|null */ - public function getVersion() : int + public function getVersion() : ?int { return $this->version; } @@ -165,17 +165,17 @@ public function hasVersion() : bool } /** - * @param null | string $productType + * @param string $productType * @return $this */ - public function setProductType(?string $productType) : static + public function setProductType(string $productType) : \OpenEuropa\EPoetry\Notification\Type\RequestReference { $this->productType = $productType; return $this; } /** - * @return null | string + * @return string|null */ public function getProductType() : ?string { diff --git a/src/Request/RequestClassmap.php b/src/Request/RequestClassmap.php index f5b33b23..b6495fc8 100644 --- a/src/Request/RequestClassmap.php +++ b/src/Request/RequestClassmap.php @@ -66,16 +66,6 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class new ClassMap('modifyProductRequestIn', Type\ModifyProductRequestIn::class), new ClassMap('modifyAuxiliaryDocumentsIn', Type\ModifyAuxiliaryDocumentsIn::class), new ClassMap('updateCallbackUrlOut', Type\UpdateCallbackUrlOut::class), - new ClassMap('dossier', Type\Dossier::class), - new ClassMap('requestDetails', Type\RequestDetails::class), - new ClassMap('originalDocument', Type\OriginalDocument::class), - new ClassMap('linguisticSection', Type\LinguisticSection::class), - new ClassMap('product', Type\Product::class), - new ClassMap('linquisticRequest', Type\LinquisticRequest::class), - new ClassMap('requestReference', Type\RequestReference::class), - new ClassMap('contactPerson', Type\ContactPerson::class), - new ClassMap('DCO', Type\DCO::class), ); } } - diff --git a/src/Request/RequestClient.php b/src/Request/RequestClient.php index 58636f26..c4cda071 100644 --- a/src/Request/RequestClient.php +++ b/src/Request/RequestClient.php @@ -21,123 +21,82 @@ public function __construct(\Phpro\SoapClient\Caller\Caller $caller) } /** - * @param RequestInterface & Type\ResubmitRequest $parameters - * @return ResultInterface & Type\ResubmitRequestResponse + * @param RequestInterface|Type\ResubmitRequest $parameters + * @return ResultInterface|Type\ResubmitRequestResponse * @throws SoapException */ public function resubmitRequest(\OpenEuropa\EPoetry\Request\Type\ResubmitRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse { - $response = ($this->caller)('resubmitRequest', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('resubmitRequest', $parameters); } /** - * @param RequestInterface & Type\UpdateCallbackUrl $parameters - * @return ResultInterface & Type\UpdateCallbackUrlResponse + * @param RequestInterface|Type\UpdateCallbackUrl $parameters + * @return ResultInterface|Type\UpdateCallbackUrlResponse * @throws SoapException */ public function updateCallbackUrl(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl $parameters) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse { - $response = ($this->caller)('updateCallbackUrl', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('updateCallbackUrl', $parameters); } /** - * @param RequestInterface & Type\ModifyLinguisticRequest $parameters - * @return ResultInterface & Type\ModifyLinguisticRequestResponse + * @param RequestInterface|Type\ModifyLinguisticRequest $parameters + * @return ResultInterface|Type\ModifyLinguisticRequestResponse * @throws SoapException */ public function modifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse { - $response = ($this->caller)('modifyLinguisticRequest', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('modifyLinguisticRequest', $parameters); } /** - * @param RequestInterface & Type\AddNewPartToDossier $parameters - * @return ResultInterface & Type\AddNewPartToDossierResponse + * @param RequestInterface|Type\AddNewPartToDossier $parameters + * @return ResultInterface|Type\AddNewPartToDossierResponse * @throws SoapException */ public function addNewPartToDossier(\OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier $parameters) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse { - $response = ($this->caller)('addNewPartToDossier', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('addNewPartToDossier', $parameters); } /** - * @param RequestInterface & Type\CreateNewVersion $parameters - * @return ResultInterface & Type\CreateNewVersionResponse + * @param RequestInterface|Type\CreateNewVersion $parameters + * @return ResultInterface|Type\CreateNewVersionResponse * @throws SoapException */ public function createNewVersion(\OpenEuropa\EPoetry\Request\Type\CreateNewVersion $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse { - $response = ($this->caller)('createNewVersion', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('createNewVersion', $parameters); } /** - * @param RequestInterface & Type\GetLinguisticRequest $parameters - * @return ResultInterface & Type\GetLinguisticRequestResponse + * @param RequestInterface|Type\GetLinguisticRequest $parameters + * @return ResultInterface|Type\GetLinguisticRequestResponse * @throws SoapException */ public function getLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse { - $response = ($this->caller)('getLinguisticRequest', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('getLinguisticRequest', $parameters); } /** - * @param RequestInterface & Type\CreateLinguisticRequest $parameters - * @return ResultInterface & Type\CreateLinguisticRequestResponse + * @param RequestInterface|Type\CreateLinguisticRequest $parameters + * @return ResultInterface|Type\CreateLinguisticRequestResponse * @throws SoapException */ public function createLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse { - $response = ($this->caller)('createLinguisticRequest', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('createLinguisticRequest', $parameters); } /** - * @param RequestInterface & Type\CreateCorrectionRequest $parameters - * @return ResultInterface & Type\CreateCorrectionRequestResponse + * @param RequestInterface|Type\CreateCorrectionRequest $parameters + * @return ResultInterface|Type\CreateCorrectionRequestResponse * @throws SoapException */ public function createCorrectionRequest(\OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest $parameters) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse { - $response = ($this->caller)('createCorrectionRequest', $parameters); - - \Psl\Type\instance_of(\OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse::class)->assert($response); - \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); - - return $response; + return ($this->caller)('createCorrectionRequest', $parameters); } } - diff --git a/src/Request/Type/AddNewPartToDossier.php b/src/Request/Type/AddNewPartToDossier.php index 84a314bb..4e22ff9e 100644 --- a/src/Request/Type/AddNewPartToDossier.php +++ b/src/Request/Type/AddNewPartToDossier.php @@ -7,37 +7,37 @@ class AddNewPartToDossier implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier = null; + private $dossier; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails = null; + private $requestDetails; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @var null | string + * @var string */ - private $templateName = null; + private $templateName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier { $this->dossier = $dossier; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -53,17 +53,17 @@ public function hasDossier() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier { $this->requestDetails = $requestDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { @@ -79,17 +79,17 @@ public function hasRequestDetails() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { @@ -105,17 +105,17 @@ public function hasApplicationName() : bool } /** - * @param null | string $templateName + * @param string $templateName * @return $this */ - public function setTemplateName(?string $templateName) : static + public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossier { $this->templateName = $templateName; return $this; } /** - * @return null | string + * @return string|null */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/AddNewPartToDossierResponse.php b/src/Request/Type/AddNewPartToDossierResponse.php index 0c078978..84e47a66 100644 --- a/src/Request/Type/AddNewPartToDossierResponse.php +++ b/src/Request/Type/AddNewPartToDossierResponse.php @@ -7,22 +7,22 @@ class AddNewPartToDossierResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\AddNewPartToDossierResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/AuxiliaryDocumentOut.php b/src/Request/Type/AuxiliaryDocumentOut.php index 2490993e..3c1321ad 100644 --- a/src/Request/Type/AuxiliaryDocumentOut.php +++ b/src/Request/Type/AuxiliaryDocumentOut.php @@ -5,42 +5,42 @@ class AuxiliaryDocumentOut { /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ - private $language = null; + private $language; /** - * @var null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' + * @var string */ - private $documentType = null; + private $documentType; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -56,17 +56,17 @@ public function hasFileName() : bool } /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut { $this->language = $language; return $this; } /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ public function getLanguage() : ?string { @@ -82,17 +82,17 @@ public function hasLanguage() : bool } /** - * @param null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' $documentType + * @param string $documentType * @return $this */ - public function setDocumentType(?string $documentType) : static + public function setDocumentType(string $documentType) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut { $this->documentType = $documentType; return $this; } /** - * @return null | 'ORI' | 'REF' | 'SRC' | 'TRAX' | 'SPOT' | 'DCO' | 'PRT' + * @return string|null */ public function getDocumentType() : ?string { @@ -108,17 +108,17 @@ public function hasDocumentType() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -134,17 +134,17 @@ public function hasComment() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { diff --git a/src/Request/Type/AuxiliaryDocuments.php b/src/Request/Type/AuxiliaryDocuments.php index dddbdfe9..73d7ddab 100644 --- a/src/Request/Type/AuxiliaryDocuments.php +++ b/src/Request/Type/AuxiliaryDocuments.php @@ -5,24 +5,22 @@ class AuxiliaryDocuments { /** - * @var array, - * \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array */ private $document = []; /** - * @param array, AuxiliaryDocumentOut[]> $document + * @param AuxiliaryDocumentOut[] $document * @return $this */ - public function setDocument(array $document) : static + public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments { $this->document = $document; return $this; } /** - * @return array, - * \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentOut[]|array|null */ public function getDocument() : ?array { diff --git a/src/Request/Type/AuxiliaryDocumentsIn.php b/src/Request/Type/AuxiliaryDocumentsIn.php index 2d8a44d5..d1a65cd5 100644 --- a/src/Request/Type/AuxiliaryDocumentsIn.php +++ b/src/Request/Type/AuxiliaryDocumentsIn.php @@ -5,42 +5,42 @@ class AuxiliaryDocumentsIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @var \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ - private $referenceDocuments = null; + private $referenceDocuments; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @var \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ - private $traxDocuments = null; + private $traxDocuments; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn */ - private $spotDocument = null; + private $spotDocument; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @var \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ - private $prtDocuments = null; + private $prtDocuments; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + * @var \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn */ - private $srcDocument = null; + private $srcDocument; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments + * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static + public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { $this->referenceDocuments = $referenceDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @return \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments|null */ public function getReferenceDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments { @@ -56,17 +56,17 @@ public function hasReferenceDocuments() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments + * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(?\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static + public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { $this->traxDocuments = $traxDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @return \OpenEuropa\EPoetry\Request\Type\TraxDocuments|null */ public function getTraxDocuments() : ?\OpenEuropa\EPoetry\Request\Type\TraxDocuments { @@ -82,17 +82,17 @@ public function hasTraxDocuments() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument + * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(?\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static + public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { $this->spotDocument = $spotDocument; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn|null */ public function getSpotDocument() : ?\OpenEuropa\EPoetry\Request\Type\DocumentIn { @@ -108,17 +108,17 @@ public function hasSpotDocument() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments + * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(?\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static + public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { $this->prtDocuments = $prtDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @return \OpenEuropa\EPoetry\Request\Type\PrtDocuments|null */ public function getPrtDocuments() : ?\OpenEuropa\EPoetry\Request\Type\PrtDocuments { @@ -134,17 +134,17 @@ public function hasPrtDocuments() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument + * @param \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument * @return $this */ - public function setSrcDocument(?\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : static + public function setSrcDocument(\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn $srcDocument) : \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { $this->srcDocument = $srcDocument; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn + * @return \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn|null */ public function getSrcDocument() : ?\OpenEuropa\EPoetry\Request\Type\SrcDocumentIn { diff --git a/src/Request/Type/ContactPerson.php b/src/Request/Type/ContactPerson.php deleted file mode 100644 index 4bb438de..00000000 --- a/src/Request/Type/ContactPerson.php +++ /dev/null @@ -1,162 +0,0 @@ -firstName = $firstName; - return $this; - } - - /** - * @return null | string - */ - public function getFirstName() : ?string - { - return $this->firstName; - } - - /** - * @return bool - */ - public function hasFirstName() : bool - { - return !empty($this->firstName); - } - - /** - * @param null | string $lastName - * @return $this - */ - public function setLastName(?string $lastName) : static - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return null | string - */ - public function getLastName() : ?string - { - return $this->lastName; - } - - /** - * @return bool - */ - public function hasLastName() : bool - { - return !empty($this->lastName); - } - - /** - * @param null | string $email - * @return $this - */ - public function setEmail(?string $email) : static - { - $this->email = $email; - return $this; - } - - /** - * @return null | string - */ - public function getEmail() : ?string - { - return $this->email; - } - - /** - * @return bool - */ - public function hasEmail() : bool - { - return !empty($this->email); - } - - /** - * @param null | string $userId - * @return $this - */ - public function setUserId(?string $userId) : static - { - $this->userId = $userId; - return $this; - } - - /** - * @return null | string - */ - public function getUserId() : ?string - { - return $this->userId; - } - - /** - * @return bool - */ - public function hasUserId() : bool - { - return !empty($this->userId); - } - - /** - * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode - * @return $this - */ - public function setRoleCode(?string $roleCode) : static - { - $this->roleCode = $roleCode; - return $this; - } - - /** - * @return null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' - */ - public function getRoleCode() : ?string - { - return $this->roleCode; - } - - /** - * @return bool - */ - public function hasRoleCode() : bool - { - return !empty($this->roleCode); - } -} - diff --git a/src/Request/Type/ContactPersonIn.php b/src/Request/Type/ContactPersonIn.php index 37ff8c2f..27c6d075 100644 --- a/src/Request/Type/ContactPersonIn.php +++ b/src/Request/Type/ContactPersonIn.php @@ -10,15 +10,15 @@ class ContactPersonIn private $userId; /** - * @var 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' + * @var string */ private $contactRole; /** * Constructor * - * @param string $userId - * @param 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $contactRole + * @var string $userId + * @var string $contactRole */ public function __construct(string $userId, string $contactRole) { @@ -30,16 +30,16 @@ public function __construct(string $userId, string $contactRole) * @param string $userId * @return $this */ - public function setUserId(string $userId) : static + public function setUserId(string $userId) : \OpenEuropa\EPoetry\Request\Type\ContactPersonIn { $this->userId = $userId; return $this; } /** - * @return string + * @return string|null */ - public function getUserId() : string + public function getUserId() : ?string { return $this->userId; } @@ -53,19 +53,19 @@ public function hasUserId() : bool } /** - * @param 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $contactRole + * @param string $contactRole * @return $this */ - public function setContactRole(string $contactRole) : static + public function setContactRole(string $contactRole) : \OpenEuropa\EPoetry\Request\Type\ContactPersonIn { $this->contactRole = $contactRole; return $this; } /** - * @return 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' + * @return string|null */ - public function getContactRole() : string + public function getContactRole() : ?string { return $this->contactRole; } diff --git a/src/Request/Type/ContactPersonOut.php b/src/Request/Type/ContactPersonOut.php index cd513943..3f378b7c 100644 --- a/src/Request/Type/ContactPersonOut.php +++ b/src/Request/Type/ContactPersonOut.php @@ -5,40 +5,40 @@ class ContactPersonOut { /** - * @var null | string + * @var string */ - private $firstName = null; + private $firstName; /** - * @var null | string + * @var string */ - private $lastName = null; + private $lastName; /** - * @var null | string + * @var string */ - private $email = null; + private $email; /** - * @var null | string + * @var string */ - private $userId = null; + private $userId; /** - * @var null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' + * @var string */ - private $roleCode = null; + private $roleCode; /** * Constructor * - * @param null | string $firstName - * @param null | string $lastName - * @param null | string $email - * @param null | string $userId - * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode + * @var string $firstName + * @var string $lastName + * @var string $email + * @var string $userId + * @var string $roleCode */ - public function __construct(?string $firstName, ?string $lastName, ?string $email, ?string $userId, ?string $roleCode) + public function __construct(string $firstName, string $lastName, string $email, string $userId, string $roleCode) { $this->firstName = $firstName; $this->lastName = $lastName; @@ -48,17 +48,17 @@ public function __construct(?string $firstName, ?string $lastName, ?string $emai } /** - * @param null | string $firstName + * @param string $firstName * @return $this */ - public function setFirstName(?string $firstName) : static + public function setFirstName(string $firstName) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut { $this->firstName = $firstName; return $this; } /** - * @return null | string + * @return string|null */ public function getFirstName() : ?string { @@ -74,17 +74,17 @@ public function hasFirstName() : bool } /** - * @param null | string $lastName + * @param string $lastName * @return $this */ - public function setLastName(?string $lastName) : static + public function setLastName(string $lastName) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut { $this->lastName = $lastName; return $this; } /** - * @return null | string + * @return string|null */ public function getLastName() : ?string { @@ -100,17 +100,17 @@ public function hasLastName() : bool } /** - * @param null | string $email + * @param string $email * @return $this */ - public function setEmail(?string $email) : static + public function setEmail(string $email) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut { $this->email = $email; return $this; } /** - * @return null | string + * @return string|null */ public function getEmail() : ?string { @@ -126,17 +126,17 @@ public function hasEmail() : bool } /** - * @param null | string $userId + * @param string $userId * @return $this */ - public function setUserId(?string $userId) : static + public function setUserId(string $userId) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut { $this->userId = $userId; return $this; } /** - * @return null | string + * @return string|null */ public function getUserId() : ?string { @@ -152,17 +152,17 @@ public function hasUserId() : bool } /** - * @param null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' $roleCode + * @param string $roleCode * @return $this */ - public function setRoleCode(?string $roleCode) : static + public function setRoleCode(string $roleCode) : \OpenEuropa\EPoetry\Request\Type\ContactPersonOut { $this->roleCode = $roleCode; return $this; } /** - * @return null | 'REQUESTER' | 'AUTHOR' | 'RECIPIENT' | 'WEBMASTER' | 'EDITOR' | 'DOCUMENT_AUTHOR' | 'DOSSIER_AUTHOR' | 'LEGISLATIVE_COORDINATOR' | 'SECRETARY' | 'CONTACT_PERSON' + * @return string|null */ public function getRoleCode() : ?string { diff --git a/src/Request/Type/Contacts.php b/src/Request/Type/Contacts.php index 64677f27..f51be847 100644 --- a/src/Request/Type/Contacts.php +++ b/src/Request/Type/Contacts.php @@ -5,24 +5,22 @@ class Contacts { /** - * @var non-empty-array, - * \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array */ private $contact = []; /** - * @param non-empty-array, ContactPersonIn[]> $contact + * @param ContactPersonIn[] $contact * @return $this */ - public function setContact(array $contact) : static + public function setContact(array $contact) : \OpenEuropa\EPoetry\Request\Type\Contacts { $this->contact = $contact; return $this; } /** - * @return non-empty-array, - * \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\ContactPersonIn[]|array|null */ public function getContact() : ?array { diff --git a/src/Request/Type/CorrectionDetailsIn.php b/src/Request/Type/CorrectionDetailsIn.php index bf6effee..3ba1b983 100644 --- a/src/Request/Type/CorrectionDetailsIn.php +++ b/src/Request/Type/CorrectionDetailsIn.php @@ -5,47 +5,47 @@ class CorrectionDetailsIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn + * @var \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn */ - private $requestReference = null; + private $requestReference; /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | mixed + * @var string */ - private $content = null; + private $content; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ - private $language = null; + private $language; /** - * @var null | string + * @var string */ - private $remark = null; + private $remark; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn + * @return \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn { @@ -61,17 +61,17 @@ public function hasRequestReference() : bool } /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -87,19 +87,19 @@ public function hasFileName() : bool } /** - * @param null | mixed $content + * @param string $content * @return $this */ - public function setContent(mixed $content) : static + public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->content = $content; return $this; } /** - * @return null | mixed + * @return string|null */ - public function getContent() : mixed + public function getContent() : ?string { return $this->content; } @@ -113,17 +113,17 @@ public function hasContent() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { @@ -139,17 +139,17 @@ public function hasFormat() : bool } /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->language = $language; return $this; } /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ public function getLanguage() : ?string { @@ -165,17 +165,17 @@ public function hasLanguage() : bool } /** - * @param null | string $remark + * @param string $remark * @return $this */ - public function setRemark(?string $remark) : static + public function setRemark(string $remark) : \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { $this->remark = $remark; return $this; } /** - * @return null | string + * @return string|null */ public function getRemark() : ?string { diff --git a/src/Request/Type/CorrectionReferenceIn.php b/src/Request/Type/CorrectionReferenceIn.php index 502886bd..55d39868 100644 --- a/src/Request/Type/CorrectionReferenceIn.php +++ b/src/Request/Type/CorrectionReferenceIn.php @@ -5,22 +5,22 @@ class CorrectionReferenceIn { /** - * @var null | int + * @var int */ - private $version = null; + private $version; /** - * @param null | int $version + * @param int $version * @return $this */ - public function setVersion(?int $version) : static + public function setVersion(int $version) : \OpenEuropa\EPoetry\Request\Type\CorrectionReferenceIn { $this->version = $version; return $this; } /** - * @return null | int + * @return int|null */ public function getVersion() : ?int { diff --git a/src/Request/Type/CorrectionRequestOut.php b/src/Request/Type/CorrectionRequestOut.php index 173f6573..f215c372 100644 --- a/src/Request/Type/CorrectionRequestOut.php +++ b/src/Request/Type/CorrectionRequestOut.php @@ -5,27 +5,27 @@ class CorrectionRequestOut { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ - private $requestReference = null; + private $requestReference; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DcoOut + * @var \OpenEuropa\EPoetry\Request\Type\DcoOut */ - private $DCO = null; + private $DCO; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DcoOut $DCO + * @param \OpenEuropa\EPoetry\Request\Type\DcoOut $DCO * @return $this */ - public function setDCO(?\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : static + public function setDCO(\OpenEuropa\EPoetry\Request\Type\DcoOut $DCO) : \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut { $this->DCO = $DCO; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DcoOut + * @return \OpenEuropa\EPoetry\Request\Type\DcoOut|null */ public function getDCO() : ?\OpenEuropa\EPoetry\Request\Type\DcoOut { diff --git a/src/Request/Type/CreateCorrectionRequest.php b/src/Request/Type/CreateCorrectionRequest.php index fe795ad6..cb272d8b 100644 --- a/src/Request/Type/CreateCorrectionRequest.php +++ b/src/Request/Type/CreateCorrectionRequest.php @@ -7,27 +7,27 @@ class CreateCorrectionRequest implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + * @var \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn */ - private $correctionDetails = null; + private $correctionDetails; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails + * @param \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails * @return $this */ - public function setCorrectionDetails(?\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : static + public function setCorrectionDetails(\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn $correctionDetails) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest { $this->correctionDetails = $correctionDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn + * @return \OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn|null */ public function getCorrectionDetails() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionDetailsIn { @@ -43,17 +43,17 @@ public function hasCorrectionDetails() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequest { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/CreateCorrectionRequestResponse.php b/src/Request/Type/CreateCorrectionRequestResponse.php index 37987c91..ff52c0b0 100644 --- a/src/Request/Type/CreateCorrectionRequestResponse.php +++ b/src/Request/Type/CreateCorrectionRequestResponse.php @@ -7,22 +7,22 @@ class CreateCorrectionRequestResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateCorrectionRequestResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\CorrectionRequestOut { diff --git a/src/Request/Type/CreateLinguisticRequest.php b/src/Request/Type/CreateLinguisticRequest.php index c96b23d6..eac0bc14 100644 --- a/src/Request/Type/CreateLinguisticRequest.php +++ b/src/Request/Type/CreateLinguisticRequest.php @@ -7,32 +7,32 @@ class CreateLinguisticRequest implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails = null; + private $requestDetails; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @var null | string + * @var string */ - private $templateName = null; + private $templateName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest { $this->requestDetails = $requestDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { @@ -48,17 +48,17 @@ public function hasRequestDetails() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { @@ -74,17 +74,17 @@ public function hasApplicationName() : bool } /** - * @param null | string $templateName + * @param string $templateName * @return $this */ - public function setTemplateName(?string $templateName) : static + public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequest { $this->templateName = $templateName; return $this; } /** - * @return null | string + * @return string|null */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/CreateLinguisticRequestResponse.php b/src/Request/Type/CreateLinguisticRequestResponse.php index 1e588e99..461ba8ed 100644 --- a/src/Request/Type/CreateLinguisticRequestResponse.php +++ b/src/Request/Type/CreateLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class CreateLinguisticRequestResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateLinguisticRequestResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/CreateNewVersion.php b/src/Request/Type/CreateNewVersion.php index 913f7130..b53f49f8 100644 --- a/src/Request/Type/CreateNewVersion.php +++ b/src/Request/Type/CreateNewVersion.php @@ -7,27 +7,27 @@ class CreateNewVersion implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ - private $linguisticRequest = null; + private $linguisticRequest; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest * @return $this */ - public function setLinguisticRequest(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : static + public function setLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $linguisticRequest) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersion { $this->linguisticRequest = $linguisticRequest; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn|null */ public function getLinguisticRequest() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { @@ -43,17 +43,17 @@ public function hasLinguisticRequest() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersion { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/CreateNewVersionResponse.php b/src/Request/Type/CreateNewVersionResponse.php index 9c50695d..efcb5836 100644 --- a/src/Request/Type/CreateNewVersionResponse.php +++ b/src/Request/Type/CreateNewVersionResponse.php @@ -7,22 +7,22 @@ class CreateNewVersionResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\CreateNewVersionResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/DCO.php b/src/Request/Type/DCO.php deleted file mode 100644 index 30ca3608..00000000 --- a/src/Request/Type/DCO.php +++ /dev/null @@ -1,224 +0,0 @@ -applicationName = $applicationName; - return $this; - } - - /** - * @return null | string - */ - public function getApplicationName() : ?string - { - return $this->applicationName; - } - - /** - * @return bool - */ - public function hasApplicationName() : bool - { - return !empty($this->applicationName); - } - - /** - * @param null | \DateTimeInterface $deadline - * @return $this - */ - public function setDeadline(?\DateTimeInterface $deadline) : static - { - $this->deadline = $deadline; - return $this; - } - - /** - * @return null | \DateTimeInterface - */ - public function getDeadline() : ?\DateTimeInterface - { - return $this->deadline; - } - - /** - * @return bool - */ - public function hasDeadline() : bool - { - return !empty($this->deadline); - } - - /** - * @param null | string $fileName - * @return $this - */ - public function setFileName(?string $fileName) : static - { - $this->fileName = $fileName; - return $this; - } - - /** - * @return null | string - */ - public function getFileName() : ?string - { - return $this->fileName; - } - - /** - * @return bool - */ - public function hasFileName() : bool - { - return !empty($this->fileName); - } - - /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format - * @return $this - */ - public function setFormat(?string $format) : static - { - $this->format = $format; - return $this; - } - - /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' - */ - public function getFormat() : ?string - { - return $this->format; - } - - /** - * @return bool - */ - public function hasFormat() : bool - { - return !empty($this->format); - } - - /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language - * @return $this - */ - public function setLanguage(?string $language) : static - { - $this->language = $language; - return $this; - } - - /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' - */ - public function getLanguage() : ?string - { - return $this->language; - } - - /** - * @return bool - */ - public function hasLanguage() : bool - { - return !empty($this->language); - } - - /** - * @param null | string $remark - * @return $this - */ - public function setRemark(?string $remark) : static - { - $this->remark = $remark; - return $this; - } - - /** - * @return null | string - */ - public function getRemark() : ?string - { - return $this->remark; - } - - /** - * @return bool - */ - public function hasRemark() : bool - { - return !empty($this->remark); - } - - /** - * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status - * @return $this - */ - public function setStatus(?string $status) : static - { - $this->status = $status; - return $this; - } - - /** - * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' - */ - public function getStatus() : ?string - { - return $this->status; - } - - /** - * @return bool - */ - public function hasStatus() : bool - { - return !empty($this->status); - } -} - diff --git a/src/Request/Type/DcoOut.php b/src/Request/Type/DcoOut.php index 34114339..cdb63c5a 100644 --- a/src/Request/Type/DcoOut.php +++ b/src/Request/Type/DcoOut.php @@ -5,52 +5,52 @@ class DcoOut { /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $deadline = null; + private $deadline; /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ - private $language = null; + private $language; /** - * @var null | string + * @var string */ - private $remark = null; + private $remark; /** - * @var null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' + * @var string */ - private $status = null; + private $status; /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { @@ -66,17 +66,17 @@ public function hasApplicationName() : bool } /** - * @param null | \DateTimeInterface $deadline + * @param \DateTimeInterface $deadline * @return $this */ - public function setDeadline(?\DateTimeInterface $deadline) : static + public function setDeadline(\DateTimeInterface $deadline) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->deadline = $deadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getDeadline() : ?\DateTimeInterface { @@ -92,17 +92,17 @@ public function hasDeadline() : bool } /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -118,17 +118,17 @@ public function hasFileName() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { @@ -144,17 +144,17 @@ public function hasFormat() : bool } /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->language = $language; return $this; } /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ public function getLanguage() : ?string { @@ -170,17 +170,17 @@ public function hasLanguage() : bool } /** - * @param null | string $remark + * @param string $remark * @return $this */ - public function setRemark(?string $remark) : static + public function setRemark(string $remark) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->remark = $remark; return $this; } /** - * @return null | string + * @return string|null */ public function getRemark() : ?string { @@ -196,17 +196,17 @@ public function hasRemark() : bool } /** - * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status + * @param string $status * @return $this */ - public function setStatus(?string $status) : static + public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\DcoOut { $this->status = $status; return $this; } /** - * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' + * @return string|null */ public function getStatus() : ?string { diff --git a/src/Request/Type/DocumentIn.php b/src/Request/Type/DocumentIn.php index 9e7cdb63..e85a3f42 100644 --- a/src/Request/Type/DocumentIn.php +++ b/src/Request/Type/DocumentIn.php @@ -5,37 +5,37 @@ class DocumentIn { /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ private $language; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | mixed + * @var string */ - private $content = null; + private $content; /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\DocumentIn { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -51,19 +51,19 @@ public function hasFileName() : bool } /** - * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\DocumentIn { $this->language = $language; return $this; } /** - * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ - public function getLanguage() : string + public function getLanguage() : ?string { return $this->language; } @@ -77,17 +77,17 @@ public function hasLanguage() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\DocumentIn { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -103,19 +103,19 @@ public function hasComment() : bool } /** - * @param null | mixed $content + * @param string $content * @return $this */ - public function setContent(mixed $content) : static + public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\DocumentIn { $this->content = $content; return $this; } /** - * @return null | mixed + * @return string|null */ - public function getContent() : mixed + public function getContent() : ?string { return $this->content; } diff --git a/src/Request/Type/Dossier.php b/src/Request/Type/Dossier.php deleted file mode 100644 index 7b961db7..00000000 --- a/src/Request/Type/Dossier.php +++ /dev/null @@ -1,100 +0,0 @@ -requesterCode = $requesterCode; - return $this; - } - - /** - * @return null | string - */ - public function getRequesterCode() : ?string - { - return $this->requesterCode; - } - - /** - * @return bool - */ - public function hasRequesterCode() : bool - { - return !empty($this->requesterCode); - } - - /** - * @param null | int $number - * @return $this - */ - public function setNumber(?int $number) : static - { - $this->number = $number; - return $this; - } - - /** - * @return null | int - */ - public function getNumber() : ?int - { - return $this->number; - } - - /** - * @return bool - */ - public function hasNumber() : bool - { - return !empty($this->number); - } - - /** - * @param null | int $year - * @return $this - */ - public function setYear(?int $year) : static - { - $this->year = $year; - return $this; - } - - /** - * @return null | int - */ - public function getYear() : ?int - { - return $this->year; - } - - /** - * @return bool - */ - public function hasYear() : bool - { - return !empty($this->year); - } -} - diff --git a/src/Request/Type/DossierReference.php b/src/Request/Type/DossierReference.php index 89679789..927566ea 100644 --- a/src/Request/Type/DossierReference.php +++ b/src/Request/Type/DossierReference.php @@ -5,32 +5,32 @@ class DossierReference { /** - * @var null | string + * @var string */ - private $requesterCode = null; + private $requesterCode; /** - * @var null | int + * @var int */ - private $number = null; + private $number; /** - * @var null | int + * @var int */ - private $year = null; + private $year; /** - * @param null | string $requesterCode + * @param string $requesterCode * @return $this */ - public function setRequesterCode(?string $requesterCode) : static + public function setRequesterCode(string $requesterCode) : \OpenEuropa\EPoetry\Request\Type\DossierReference { $this->requesterCode = $requesterCode; return $this; } /** - * @return null | string + * @return string|null */ public function getRequesterCode() : ?string { @@ -46,17 +46,17 @@ public function hasRequesterCode() : bool } /** - * @param null | int $number + * @param int $number * @return $this */ - public function setNumber(?int $number) : static + public function setNumber(int $number) : \OpenEuropa\EPoetry\Request\Type\DossierReference { $this->number = $number; return $this; } /** - * @return null | int + * @return int|null */ public function getNumber() : ?int { @@ -72,17 +72,17 @@ public function hasNumber() : bool } /** - * @param null | int $year + * @param int $year * @return $this */ - public function setYear(?int $year) : static + public function setYear(int $year) : \OpenEuropa\EPoetry\Request\Type\DossierReference { $this->year = $year; return $this; } /** - * @return null | int + * @return int|null */ public function getYear() : ?int { diff --git a/src/Request/Type/GetLinguisticRequest.php b/src/Request/Type/GetLinguisticRequest.php index bfb95e80..d100cd69 100644 --- a/src/Request/Type/GetLinguisticRequest.php +++ b/src/Request/Type/GetLinguisticRequest.php @@ -7,27 +7,27 @@ class GetLinguisticRequest implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ - private $requestReference = null; + private $requestReference; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { @@ -43,17 +43,17 @@ public function hasRequestReference() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequest { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/GetLinguisticRequestResponse.php b/src/Request/Type/GetLinguisticRequestResponse.php index 492e2ad8..e5642a4e 100644 --- a/src/Request/Type/GetLinguisticRequestResponse.php +++ b/src/Request/Type/GetLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class GetLinguisticRequestResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\GetLinguisticRequestResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/InformativeMessages.php b/src/Request/Type/InformativeMessages.php index 0e61a654..6a979c90 100644 --- a/src/Request/Type/InformativeMessages.php +++ b/src/Request/Type/InformativeMessages.php @@ -5,22 +5,22 @@ class InformativeMessages { /** - * @var array, string[]|array> + * @var string[]|array */ private $message = []; /** - * @param array, string[]> $message + * @param string[] $message * @return $this */ - public function setMessage(array $message) : static + public function setMessage(array $message) : \OpenEuropa\EPoetry\Request\Type\InformativeMessages { $this->message = $message; return $this; } /** - * @return array, string[]|array> + * @return string[]|array|null */ public function getMessage() : ?array { diff --git a/src/Request/Type/LinguisticRequestIn.php b/src/Request/Type/LinguisticRequestIn.php index 759ed872..4a027844 100644 --- a/src/Request/Type/LinguisticRequestIn.php +++ b/src/Request/Type/LinguisticRequestIn.php @@ -5,27 +5,27 @@ class LinguisticRequestIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn */ - private $requestReference = null; + private $requestReference; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn */ - private $requestDetails = null; + private $requestDetails; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn + * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails + * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : static + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { $this->requestDetails = $requestDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn + * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn|null */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { diff --git a/src/Request/Type/LinguisticRequestOut.php b/src/Request/Type/LinguisticRequestOut.php index 0cc5b06c..39c5d0b2 100644 --- a/src/Request/Type/LinguisticRequestOut.php +++ b/src/Request/Type/LinguisticRequestOut.php @@ -5,32 +5,32 @@ class LinguisticRequestOut { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @var \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut */ - private $requestReference = null; + private $requestReference; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + * @var \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut */ - private $requestDetails = null; + private $requestDetails; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages + * @var \OpenEuropa\EPoetry\Request\Type\InformativeMessages */ - private $informativeMessages = null; + private $informativeMessages; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut $requestReference) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut + * @return \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { @@ -46,17 +46,17 @@ public function hasRequestReference() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails + * @param \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails * @return $this */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { $this->requestDetails = $requestDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut + * @return \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut|null */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { @@ -72,17 +72,17 @@ public function hasRequestDetails() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages + * @param \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages * @return $this */ - public function setInformativeMessages(?\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static + public function setInformativeMessages(\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { $this->informativeMessages = $informativeMessages; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages + * @return \OpenEuropa\EPoetry\Request\Type\InformativeMessages|null */ public function getInformativeMessages() : ?\OpenEuropa\EPoetry\Request\Type\InformativeMessages { diff --git a/src/Request/Type/LinguisticSection.php b/src/Request/Type/LinguisticSection.php deleted file mode 100644 index 12566fa9..00000000 --- a/src/Request/Type/LinguisticSection.php +++ /dev/null @@ -1,38 +0,0 @@ -language = $language; - return $this; - } - - /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' - */ - public function getLanguage() : ?string - { - return $this->language; - } - - /** - * @return bool - */ - public function hasLanguage() : bool - { - return !empty($this->language); - } -} - diff --git a/src/Request/Type/LinguisticSectionIn.php b/src/Request/Type/LinguisticSectionIn.php index 54aab273..f68f6d69 100644 --- a/src/Request/Type/LinguisticSectionIn.php +++ b/src/Request/Type/LinguisticSectionIn.php @@ -5,14 +5,14 @@ class LinguisticSectionIn { /** - * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ private $language; /** * Constructor * - * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @var string $language */ public function __construct(string $language) { @@ -20,19 +20,19 @@ public function __construct(string $language) } /** - * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\LinguisticSectionIn { $this->language = $language; return $this; } /** - * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ - public function getLanguage() : string + public function getLanguage() : ?string { return $this->language; } diff --git a/src/Request/Type/LinguisticSectionOut.php b/src/Request/Type/LinguisticSectionOut.php index bad9cfe2..0f8317ef 100644 --- a/src/Request/Type/LinguisticSectionOut.php +++ b/src/Request/Type/LinguisticSectionOut.php @@ -5,32 +5,32 @@ class LinguisticSectionOut { /** - * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ - private $language = null; + private $language; /** * Constructor * - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @var string $language */ - public function __construct(?string $language) + public function __construct(string $language) { $this->language = $language; } /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut { $this->language = $language; return $this; } /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ public function getLanguage() : ?string { diff --git a/src/Request/Type/LinguisticSections.php b/src/Request/Type/LinguisticSections.php index 9164a08f..378cf6f0 100644 --- a/src/Request/Type/LinguisticSections.php +++ b/src/Request/Type/LinguisticSections.php @@ -5,24 +5,22 @@ class LinguisticSections { /** - * @var array, - * \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array */ private $linguisticSection = []; /** - * @param array, LinguisticSectionOut[]> $linguisticSection + * @param LinguisticSectionOut[] $linguisticSection * @return $this */ - public function setLinguisticSection(array $linguisticSection) : static + public function setLinguisticSection(array $linguisticSection) : \OpenEuropa\EPoetry\Request\Type\LinguisticSections { $this->linguisticSection = $linguisticSection; return $this; } /** - * @return array, - * \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSectionOut[]|array|null */ public function getLinguisticSection() : ?array { diff --git a/src/Request/Type/LinquisticRequest.php b/src/Request/Type/LinquisticRequest.php deleted file mode 100644 index 5cebfa90..00000000 --- a/src/Request/Type/LinquisticRequest.php +++ /dev/null @@ -1,100 +0,0 @@ -requestReference = $requestReference; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut - */ - public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\RequestReferenceOut - { - return $this->requestReference; - } - - /** - * @return bool - */ - public function hasRequestReference() : bool - { - return !empty($this->requestReference); - } - - /** - * @param null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails - * @return $this - */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut $requestDetails) : static - { - $this->requestDetails = $requestDetails; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut - */ - public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\RequestDetailsOut - { - return $this->requestDetails; - } - - /** - * @return bool - */ - public function hasRequestDetails() : bool - { - return !empty($this->requestDetails); - } - - /** - * @param null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages - * @return $this - */ - public function setInformativeMessages(?\OpenEuropa\EPoetry\Request\Type\InformativeMessages $informativeMessages) : static - { - $this->informativeMessages = $informativeMessages; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\InformativeMessages - */ - public function getInformativeMessages() : ?\OpenEuropa\EPoetry\Request\Type\InformativeMessages - { - return $this->informativeMessages; - } - - /** - * @return bool - */ - public function hasInformativeMessages() : bool - { - return !empty($this->informativeMessages); - } -} - diff --git a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php index a90ce5b5..9202d6ee 100644 --- a/src/Request/Type/ModifyAuxiliaryDocumentsIn.php +++ b/src/Request/Type/ModifyAuxiliaryDocumentsIn.php @@ -5,37 +5,37 @@ class ModifyAuxiliaryDocumentsIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @var \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments */ - private $referenceDocuments = null; + private $referenceDocuments; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @var \OpenEuropa\EPoetry\Request\Type\TraxDocuments */ - private $traxDocuments = null; + private $traxDocuments; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn */ - private $spotDocument = null; + private $spotDocument; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @var \OpenEuropa\EPoetry\Request\Type\PrtDocuments */ - private $prtDocuments = null; + private $prtDocuments; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments + * @param \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments * @return $this */ - public function setReferenceDocuments(?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : static + public function setReferenceDocuments(\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments $referenceDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { $this->referenceDocuments = $referenceDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments + * @return \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments|null */ public function getReferenceDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ReferenceDocuments { @@ -51,17 +51,17 @@ public function hasReferenceDocuments() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments + * @param \OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments * @return $this */ - public function setTraxDocuments(?\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : static + public function setTraxDocuments(\OpenEuropa\EPoetry\Request\Type\TraxDocuments $traxDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { $this->traxDocuments = $traxDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\TraxDocuments + * @return \OpenEuropa\EPoetry\Request\Type\TraxDocuments|null */ public function getTraxDocuments() : ?\OpenEuropa\EPoetry\Request\Type\TraxDocuments { @@ -77,17 +77,17 @@ public function hasTraxDocuments() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument + * @param \OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument * @return $this */ - public function setSpotDocument(?\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : static + public function setSpotDocument(\OpenEuropa\EPoetry\Request\Type\DocumentIn $spotDocument) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { $this->spotDocument = $spotDocument; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DocumentIn + * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn|null */ public function getSpotDocument() : ?\OpenEuropa\EPoetry\Request\Type\DocumentIn { @@ -103,17 +103,17 @@ public function hasSpotDocument() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments + * @param \OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments * @return $this */ - public function setPrtDocuments(?\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : static + public function setPrtDocuments(\OpenEuropa\EPoetry\Request\Type\PrtDocuments $prtDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { $this->prtDocuments = $prtDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\PrtDocuments + * @return \OpenEuropa\EPoetry\Request\Type\PrtDocuments|null */ public function getPrtDocuments() : ?\OpenEuropa\EPoetry\Request\Type\PrtDocuments { diff --git a/src/Request/Type/ModifyLinguisticRequest.php b/src/Request/Type/ModifyLinguisticRequest.php index 3c0c9dd8..7c91c130 100644 --- a/src/Request/Type/ModifyLinguisticRequest.php +++ b/src/Request/Type/ModifyLinguisticRequest.php @@ -7,27 +7,27 @@ class ModifyLinguisticRequest implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn + * @var \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn */ - private $modifyLinguisticRequest = null; + private $modifyLinguisticRequest; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest + * @param \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest * @return $this */ - public function setModifyLinguisticRequest(?\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : static + public function setModifyLinguisticRequest(\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn $modifyLinguisticRequest) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest { $this->modifyLinguisticRequest = $modifyLinguisticRequest; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn + * @return \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn|null */ public function getModifyLinguisticRequest() : ?\OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn { @@ -43,17 +43,17 @@ public function hasModifyLinguisticRequest() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequest { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/ModifyLinguisticRequestIn.php b/src/Request/Type/ModifyLinguisticRequestIn.php index 69646988..efc7ab16 100644 --- a/src/Request/Type/ModifyLinguisticRequestIn.php +++ b/src/Request/Type/ModifyLinguisticRequestIn.php @@ -5,27 +5,27 @@ class ModifyLinguisticRequestIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + * @var \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn */ - private $requestReference = null; + private $requestReference; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + * @var \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn */ - private $requestDetails = null; + private $requestDetails; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference + * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference * @return $this */ - public function setRequestReference(?\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : static + public function setRequestReference(\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn $requestReference) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn { $this->requestReference = $requestReference; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn + * @return \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn|null */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails + * @param \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails * @return $this */ - public function setRequestDetails(?\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : static + public function setRequestDetails(\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn $requestDetails) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestIn { $this->requestDetails = $requestDetails; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn + * @return \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn|null */ public function getRequestDetails() : ?\OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn { diff --git a/src/Request/Type/ModifyLinguisticRequestResponse.php b/src/Request/Type/ModifyLinguisticRequestResponse.php index 55b0bf97..ba1bc525 100644 --- a/src/Request/Type/ModifyLinguisticRequestResponse.php +++ b/src/Request/Type/ModifyLinguisticRequestResponse.php @@ -7,22 +7,22 @@ class ModifyLinguisticRequestResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\ModifyLinguisticRequestResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/ModifyProductRequestIn.php b/src/Request/Type/ModifyProductRequestIn.php index aa320e9d..db6bc0e1 100644 --- a/src/Request/Type/ModifyProductRequestIn.php +++ b/src/Request/Type/ModifyProductRequestIn.php @@ -5,7 +5,7 @@ class ModifyProductRequestIn { /** - * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ private $language; @@ -20,19 +20,19 @@ class ModifyProductRequestIn private $trackChanges; /** - * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn { $this->language = $language; return $this; } /** - * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ - public function getLanguage() : string + public function getLanguage() : ?string { return $this->language; } @@ -49,16 +49,16 @@ public function hasLanguage() : bool * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return \DateTimeInterface + * @return \DateTimeInterface|null */ - public function getRequestedDeadline() : \DateTimeInterface + public function getRequestedDeadline() : ?\DateTimeInterface { return $this->requestedDeadline; } @@ -75,16 +75,16 @@ public function hasRequestedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : static + public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn { $this->trackChanges = $trackChanges; return $this; } /** - * @return bool + * @return bool|null */ - public function isTrackChanges() : bool + public function isTrackChanges() : ?bool { return $this->trackChanges; } diff --git a/src/Request/Type/ModifyRequestDetailsIn.php b/src/Request/Type/ModifyRequestDetailsIn.php index cae1fa9e..a83a4a9b 100644 --- a/src/Request/Type/ModifyRequestDetailsIn.php +++ b/src/Request/Type/ModifyRequestDetailsIn.php @@ -10,29 +10,29 @@ class ModifyRequestDetailsIn private $contacts; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\Products + * @var \OpenEuropa\EPoetry\Request\Type\Products */ - private $products = null; + private $products; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + * @var \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn */ - private $auxiliaryDocuments = null; + private $auxiliaryDocuments; /** * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn { $this->contacts = $contacts; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts + * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null */ - public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts + public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts { return $this->contacts; } @@ -46,17 +46,17 @@ public function hasContacts() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products + * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn { $this->products = $products; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\Products + * @return \OpenEuropa\EPoetry\Request\Type\Products|null */ public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products { @@ -72,17 +72,17 @@ public function hasProducts() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments + * @param \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestDetailsIn { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn + * @return \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn|null */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn { diff --git a/src/Request/Type/ModifyRequestReferenceIn.php b/src/Request/Type/ModifyRequestReferenceIn.php index 91c8a783..41ef8f10 100644 --- a/src/Request/Type/ModifyRequestReferenceIn.php +++ b/src/Request/Type/ModifyRequestReferenceIn.php @@ -5,32 +5,32 @@ class ModifyRequestReferenceIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier = null; + private $dossier; /** - * @var null | string + * @var string */ - private $productType = null; + private $productType; /** - * @var null | int + * @var int */ - private $part = null; + private $part; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn { $this->dossier = $dossier; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -46,17 +46,17 @@ public function hasDossier() : bool } /** - * @param null | string $productType + * @param string $productType * @return $this */ - public function setProductType(?string $productType) : static + public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn { $this->productType = $productType; return $this; } /** - * @return null | string + * @return string|null */ public function getProductType() : ?string { @@ -72,17 +72,17 @@ public function hasProductType() : bool } /** - * @param null | int $part + * @param int $part * @return $this */ - public function setPart(?int $part) : static + public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\ModifyRequestReferenceIn { $this->part = $part; return $this; } /** - * @return null | int + * @return int|null */ public function getPart() : ?int { diff --git a/src/Request/Type/NoSuchMethodException.php b/src/Request/Type/NoSuchMethodException.php index 0140b882..093fd8cb 100644 --- a/src/Request/Type/NoSuchMethodException.php +++ b/src/Request/Type/NoSuchMethodException.php @@ -5,22 +5,22 @@ class NoSuchMethodException { /** - * @var null | string + * @var string */ - private $message = null; + private $message; /** - * @param null | string $message + * @param string $message * @return $this */ - public function setMessage(?string $message) : static + public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\NoSuchMethodException { $this->message = $message; return $this; } /** - * @return null | string + * @return string|null */ public function getMessage() : ?string { diff --git a/src/Request/Type/OriginalDocument.php b/src/Request/Type/OriginalDocument.php deleted file mode 100644 index e7732c84..00000000 --- a/src/Request/Type/OriginalDocument.php +++ /dev/null @@ -1,193 +0,0 @@ -trackChanges = $trackChanges; - return $this; - } - - /** - * @return bool - */ - public function isTrackChanges() : bool - { - return $this->trackChanges; - } - - /** - * @return bool - */ - public function hasTrackChanges() : bool - { - return !empty($this->trackChanges); - } - - /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format - * @return $this - */ - public function setFormat(?string $format) : static - { - $this->format = $format; - return $this; - } - - /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' - */ - public function getFormat() : ?string - { - return $this->format; - } - - /** - * @return bool - */ - public function hasFormat() : bool - { - return !empty($this->format); - } - - /** - * @param null | string $fileName - * @return $this - */ - public function setFileName(?string $fileName) : static - { - $this->fileName = $fileName; - return $this; - } - - /** - * @return null | string - */ - public function getFileName() : ?string - { - return $this->fileName; - } - - /** - * @return bool - */ - public function hasFileName() : bool - { - return !empty($this->fileName); - } - - /** - * @param null | float $pages - * @return $this - */ - public function setPages(?float $pages) : static - { - $this->pages = $pages; - return $this; - } - - /** - * @return null | float - */ - public function getPages() : ?float - { - return $this->pages; - } - - /** - * @return bool - */ - public function hasPages() : bool - { - return !empty($this->pages); - } - - /** - * @param null | string $comment - * @return $this - */ - public function setComment(?string $comment) : static - { - $this->comment = $comment; - return $this; - } - - /** - * @return null | string - */ - public function getComment() : ?string - { - return $this->comment; - } - - /** - * @return bool - */ - public function hasComment() : bool - { - return !empty($this->comment); - } - - /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections - * @return $this - */ - public function setLinguisticSections(?\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static - { - $this->linguisticSections = $linguisticSections; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections - */ - public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections - { - return $this->linguisticSections; - } - - /** - * @return bool - */ - public function hasLinguisticSections() : bool - { - return !empty($this->linguisticSections); - } -} - diff --git a/src/Request/Type/OriginalDocumentIn.php b/src/Request/Type/OriginalDocumentIn.php index 93fcfe79..035dc6d3 100644 --- a/src/Request/Type/OriginalDocumentIn.php +++ b/src/Request/Type/OriginalDocumentIn.php @@ -5,19 +5,19 @@ class OriginalDocumentIn { /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | mixed + * @var string */ - private $content = null; + private $content; /** * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSections @@ -30,17 +30,17 @@ class OriginalDocumentIn private $trackChanges; /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -56,17 +56,17 @@ public function hasFileName() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -82,19 +82,19 @@ public function hasComment() : bool } /** - * @param null | mixed $content + * @param string $content * @return $this */ - public function setContent(mixed $content) : static + public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { $this->content = $content; return $this; } /** - * @return null | mixed + * @return string|null */ - public function getContent() : mixed + public function getContent() : ?string { return $this->content; } @@ -111,16 +111,16 @@ public function hasContent() : bool * @param \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections * @return $this */ - public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static + public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { $this->linguisticSections = $linguisticSections; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections|null */ - public function getLinguisticSections() : \OpenEuropa\EPoetry\Request\Type\LinguisticSections + public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections { return $this->linguisticSections; } @@ -137,16 +137,16 @@ public function hasLinguisticSections() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : static + public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { $this->trackChanges = $trackChanges; return $this; } /** - * @return bool + * @return bool|null */ - public function isTrackChanges() : bool + public function isTrackChanges() : ?bool { return $this->trackChanges; } diff --git a/src/Request/Type/OriginalDocumentOut.php b/src/Request/Type/OriginalDocumentOut.php index 0ae6f6bc..2cb6cc81 100644 --- a/src/Request/Type/OriginalDocumentOut.php +++ b/src/Request/Type/OriginalDocumentOut.php @@ -10,44 +10,44 @@ class OriginalDocumentOut private $trackChanges; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | float + * @var float */ - private $pages = null; + private $pages; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticSections */ - private $linguisticSections = null; + private $linguisticSections; /** * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : static + public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->trackChanges = $trackChanges; return $this; } /** - * @return bool + * @return bool|null */ - public function isTrackChanges() : bool + public function isTrackChanges() : ?bool { return $this->trackChanges; } @@ -61,17 +61,17 @@ public function hasTrackChanges() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { @@ -87,17 +87,17 @@ public function hasFormat() : bool } /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -113,17 +113,17 @@ public function hasFileName() : bool } /** - * @param null | float $pages + * @param float $pages * @return $this */ - public function setPages(?float $pages) : static + public function setPages(float $pages) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->pages = $pages; return $this; } /** - * @return null | float + * @return float|null */ public function getPages() : ?float { @@ -139,17 +139,17 @@ public function hasPages() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -165,17 +165,17 @@ public function hasComment() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections * @return $this */ - public function setLinguisticSections(?\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : static + public function setLinguisticSections(\OpenEuropa\EPoetry\Request\Type\LinguisticSections $linguisticSections) : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { $this->linguisticSections = $linguisticSections; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticSections + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticSections|null */ public function getLinguisticSections() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticSections { diff --git a/src/Request/Type/Product.php b/src/Request/Type/Product.php deleted file mode 100644 index cf9e310c..00000000 --- a/src/Request/Type/Product.php +++ /dev/null @@ -1,100 +0,0 @@ -language = $language; - return $this; - } - - /** - * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' - */ - public function getLanguage() : string - { - return $this->language; - } - - /** - * @return bool - */ - public function hasLanguage() : bool - { - return !empty($this->language); - } - - /** - * @param \DateTimeInterface $requestedDeadline - * @return $this - */ - public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : static - { - $this->requestedDeadline = $requestedDeadline; - return $this; - } - - /** - * @return \DateTimeInterface - */ - public function getRequestedDeadline() : \DateTimeInterface - { - return $this->requestedDeadline; - } - - /** - * @return bool - */ - public function hasRequestedDeadline() : bool - { - return !empty($this->requestedDeadline); - } - - /** - * @param bool $trackChanges - * @return $this - */ - public function setTrackChanges(bool $trackChanges) : static - { - $this->trackChanges = $trackChanges; - return $this; - } - - /** - * @return bool - */ - public function isTrackChanges() : bool - { - return $this->trackChanges; - } - - /** - * @return bool - */ - public function hasTrackChanges() : bool - { - return !empty($this->trackChanges); - } -} - diff --git a/src/Request/Type/ProductRequestIn.php b/src/Request/Type/ProductRequestIn.php index 44b49113..8a0c1662 100644 --- a/src/Request/Type/ProductRequestIn.php +++ b/src/Request/Type/ProductRequestIn.php @@ -5,14 +5,14 @@ class ProductRequestIn { /** - * @var 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ private $language; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $requestedDeadline = null; + private $requestedDeadline; /** * @var bool @@ -20,19 +20,19 @@ class ProductRequestIn private $trackChanges; /** - * @param 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn { $this->language = $language; return $this; } /** - * @return 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ - public function getLanguage() : string + public function getLanguage() : ?string { return $this->language; } @@ -46,17 +46,17 @@ public function hasLanguage() : bool } /** - * @param null | \DateTimeInterface $requestedDeadline + * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -75,16 +75,16 @@ public function hasRequestedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : static + public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ProductRequestIn { $this->trackChanges = $trackChanges; return $this; } /** - * @return bool + * @return bool|null */ - public function isTrackChanges() : bool + public function isTrackChanges() : ?bool { return $this->trackChanges; } diff --git a/src/Request/Type/ProductRequestOut.php b/src/Request/Type/ProductRequestOut.php index 014714c8..f0edb2d6 100644 --- a/src/Request/Type/ProductRequestOut.php +++ b/src/Request/Type/ProductRequestOut.php @@ -5,19 +5,19 @@ class ProductRequestOut { /** - * @var null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @var string */ - private $language = null; + private $language; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $requestedDeadline = null; + private $requestedDeadline; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $acceptedDeadline = null; + private $acceptedDeadline; /** * @var bool @@ -25,27 +25,27 @@ class ProductRequestOut private $trackChanges; /** - * @var null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' + * @var string */ - private $status = null; + private $status; /** - * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @var string */ - private $format = null; + private $format; /** - * @param null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' $language + * @param string $language * @return $this */ - public function setLanguage(?string $language) : static + public function setLanguage(string $language) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->language = $language; return $this; } /** - * @return null | 'ML' | 'EN' | 'FR' | 'DE' | 'BG' | 'HR' | 'CS' | 'DA' | 'NL' | 'ET' | 'FI' | 'EL' | 'HU' | 'GA' | 'IT' | 'LV' | 'LT' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SL' | 'ES' | 'SV' | 'AF' | 'SQ' | 'AM' | 'AR' | 'HY' | 'AZ' | 'EU' | 'BE' | 'BI' | 'BO' | 'BR' | 'CN' | 'CA' | 'ZH' | 'KW' | 'CO' | 'EG' | 'EO' | 'FO' | 'FY' | 'GD' | 'GL' | 'KA' | 'GU' | 'IW' | 'HI' | 'IS' | 'IN' | 'JA' | 'KL' | 'KK' | 'KY' | 'KO' | 'KU' | 'LA' | 'LN' | 'LU' | 'MK' | 'MG' | 'MS' | 'GV' | 'MR' | 'MO' | 'MN' | 'ME' | 'SE' | 'NO' | 'NB' | 'NN' | 'OC' | 'AU' | 'PS' | 'PA' | 'FA' | 'RM' | 'RU' | 'SC' | 'SR' | 'SH' | 'SW' | 'TG' | 'TH' | 'TI' | 'TR' | 'UK' | 'UR' | 'UZ' | 'VI' | 'WO' | 'CY' | 'JI' | 'YO' | 'ZZ' + * @return string|null */ public function getLanguage() : ?string { @@ -61,17 +61,17 @@ public function hasLanguage() : bool } /** - * @param null | \DateTimeInterface $requestedDeadline + * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -87,17 +87,17 @@ public function hasRequestedDeadline() : bool } /** - * @param null | \DateTimeInterface $acceptedDeadline + * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -116,16 +116,16 @@ public function hasAcceptedDeadline() : bool * @param bool $trackChanges * @return $this */ - public function setTrackChanges(bool $trackChanges) : static + public function setTrackChanges(bool $trackChanges) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->trackChanges = $trackChanges; return $this; } /** - * @return bool + * @return bool|null */ - public function isTrackChanges() : bool + public function isTrackChanges() : ?bool { return $this->trackChanges; } @@ -139,17 +139,17 @@ public function hasTrackChanges() : bool } /** - * @param null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' $status + * @param string $status * @return $this */ - public function setStatus(?string $status) : static + public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->status = $status; return $this; } /** - * @return null | 'Accepted' | 'SenttoDGT' | 'Ongoing' | 'Received' | 'Rejected' | 'Requested' | 'Executed' | 'Sent' | 'ToBeValidated' + * @return string|null */ public function getStatus() : ?string { @@ -165,17 +165,17 @@ public function hasStatus() : bool } /** - * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format + * @param string $format * @return $this */ - public function setFormat(?string $format) : static + public function setFormat(string $format) : \OpenEuropa\EPoetry\Request\Type\ProductRequestOut { $this->format = $format; return $this; } /** - * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' + * @return string|null */ public function getFormat() : ?string { diff --git a/src/Request/Type/Products.php b/src/Request/Type/Products.php index 9cdda099..69a4bc05 100644 --- a/src/Request/Type/Products.php +++ b/src/Request/Type/Products.php @@ -5,24 +5,22 @@ class Products { /** - * @var array, - * \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array */ private $product = []; /** - * @param array, ModifyProductRequestIn[]> $product + * @param ModifyProductRequestIn[] $product * @return $this */ - public function setProduct(array $product) : static + public function setProduct(array $product) : \OpenEuropa\EPoetry\Request\Type\Products { $this->product = $product; return $this; } /** - * @return array, - * \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\ModifyProductRequestIn[]|array|null */ public function getProduct() : ?array { diff --git a/src/Request/Type/PrtDocuments.php b/src/Request/Type/PrtDocuments.php index 8f8c8a33..7365882a 100644 --- a/src/Request/Type/PrtDocuments.php +++ b/src/Request/Type/PrtDocuments.php @@ -5,22 +5,22 @@ class PrtDocuments { /** - * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array */ private $document = []; /** - * @param array, DocumentIn[]> $document + * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : static + public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\PrtDocuments { $this->document = $document; return $this; } /** - * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null */ public function getDocument() : ?array { diff --git a/src/Request/Type/ReferenceDocuments.php b/src/Request/Type/ReferenceDocuments.php index d1aaac39..ca25aa9e 100644 --- a/src/Request/Type/ReferenceDocuments.php +++ b/src/Request/Type/ReferenceDocuments.php @@ -5,22 +5,22 @@ class ReferenceDocuments { /** - * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array */ private $document = []; /** - * @param array, DocumentIn[]> $document + * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : static + public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\ReferenceDocuments { $this->document = $document; return $this; } /** - * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null */ public function getDocument() : ?array { diff --git a/src/Request/Type/RequestDetails.php b/src/Request/Type/RequestDetails.php deleted file mode 100644 index a4137aac..00000000 --- a/src/Request/Type/RequestDetails.php +++ /dev/null @@ -1,100 +0,0 @@ -contacts = $contacts; - return $this; - } - - /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts - */ - public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts - { - return $this->contacts; - } - - /** - * @return bool - */ - public function hasContacts() : bool - { - return !empty($this->contacts); - } - - /** - * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products - * @return $this - */ - public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static - { - $this->products = $products; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\Products - */ - public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products - { - return $this->products; - } - - /** - * @return bool - */ - public function hasProducts() : bool - { - return !empty($this->products); - } - - /** - * @param null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments - * @return $this - */ - public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn $auxiliaryDocuments) : static - { - $this->auxiliaryDocuments = $auxiliaryDocuments; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn - */ - public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\ModifyAuxiliaryDocumentsIn - { - return $this->auxiliaryDocuments; - } - - /** - * @return bool - */ - public function hasAuxiliaryDocuments() : bool - { - return !empty($this->auxiliaryDocuments); - } -} - diff --git a/src/Request/Type/RequestDetailsIn.php b/src/Request/Type/RequestDetailsIn.php index 82dc4763..484a930e 100644 --- a/src/Request/Type/RequestDetailsIn.php +++ b/src/Request/Type/RequestDetailsIn.php @@ -10,89 +10,89 @@ class RequestDetailsIn private $title; /** - * @var null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' + * @var string */ - private $workflowCode = null; + private $workflowCode; /** - * @var null | string + * @var string */ - private $internalReference = null; + private $internalReference; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $requestedDeadline = null; + private $requestedDeadline; /** - * @var null | bool + * @var bool */ - private $sensitive = null; + private $sensitive; /** - * @var null | bool + * @var bool */ - private $sentViaRue = null; + private $sentViaRue; /** - * @var null | bool + * @var bool */ - private $documentToAdopt = null; + private $documentToAdopt; /** - * @var null | string + * @var string */ - private $decideReference = null; + private $decideReference; /** - * @var null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' + * @var string */ - private $destination = null; + private $destination; /** - * @var null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' + * @var string */ - private $procedure = null; + private $procedure; /** - * @var null | 'ANNEX8A' | 'ANNEX8B' | 'NO' + * @var string */ - private $slaAnnex = null; + private $slaAnnex; /** - * @var null | string + * @var string */ - private $slaCommitment = null; + private $slaCommitment; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | string + * @var string */ - private $onBehalfOf = null; + private $onBehalfOf; /** - * @var null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' + * @var string */ - private $accessibleTo = null; + private $accessibleTo; /** - * @var null | string + * @var string */ - private $keyword1 = null; + private $keyword1; /** - * @var null | string + * @var string */ - private $keyword2 = null; + private $keyword2; /** - * @var null | string + * @var string */ - private $keyword3 = null; + private $keyword3; /** * @var \OpenEuropa\EPoetry\Request\Type\Contacts @@ -110,24 +110,24 @@ class RequestDetailsIn private $products; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn */ - private $auxiliaryDocuments = null; + private $auxiliaryDocuments; /** * @param string $title * @return $this */ - public function setTitle(string $title) : static + public function setTitle(string $title) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->title = $title; return $this; } /** - * @return string + * @return string|null */ - public function getTitle() : string + public function getTitle() : ?string { return $this->title; } @@ -141,17 +141,17 @@ public function hasTitle() : bool } /** - * @param null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' $workflowCode + * @param string $workflowCode * @return $this */ - public function setWorkflowCode(?string $workflowCode) : static + public function setWorkflowCode(string $workflowCode) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->workflowCode = $workflowCode; return $this; } /** - * @return null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' + * @return string|null */ public function getWorkflowCode() : ?string { @@ -167,17 +167,17 @@ public function hasWorkflowCode() : bool } /** - * @param null | string $internalReference + * @param string $internalReference * @return $this */ - public function setInternalReference(?string $internalReference) : static + public function setInternalReference(string $internalReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->internalReference = $internalReference; return $this; } /** - * @return null | string + * @return string|null */ public function getInternalReference() : ?string { @@ -193,17 +193,17 @@ public function hasInternalReference() : bool } /** - * @param null | \DateTimeInterface $requestedDeadline + * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -219,17 +219,17 @@ public function hasRequestedDeadline() : bool } /** - * @param null | bool $sensitive + * @param bool $sensitive * @return $this */ - public function setSensitive(?bool $sensitive) : static + public function setSensitive(bool $sensitive) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->sensitive = $sensitive; return $this; } /** - * @return null | bool + * @return bool|null */ public function isSensitive() : ?bool { @@ -245,17 +245,17 @@ public function hasSensitive() : bool } /** - * @param null | bool $sentViaRue + * @param bool $sentViaRue * @return $this */ - public function setSentViaRue(?bool $sentViaRue) : static + public function setSentViaRue(bool $sentViaRue) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->sentViaRue = $sentViaRue; return $this; } /** - * @return null | bool + * @return bool|null */ public function isSentViaRue() : ?bool { @@ -271,17 +271,17 @@ public function hasSentViaRue() : bool } /** - * @param null | bool $documentToAdopt + * @param bool $documentToAdopt * @return $this */ - public function setDocumentToAdopt(?bool $documentToAdopt) : static + public function setDocumentToAdopt(bool $documentToAdopt) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->documentToAdopt = $documentToAdopt; return $this; } /** - * @return null | bool + * @return bool|null */ public function isDocumentToAdopt() : ?bool { @@ -297,17 +297,17 @@ public function hasDocumentToAdopt() : bool } /** - * @param null | string $decideReference + * @param string $decideReference * @return $this */ - public function setDecideReference(?string $decideReference) : static + public function setDecideReference(string $decideReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->decideReference = $decideReference; return $this; } /** - * @return null | string + * @return string|null */ public function getDecideReference() : ?string { @@ -323,17 +323,17 @@ public function hasDecideReference() : bool } /** - * @param null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' $destination + * @param string $destination * @return $this */ - public function setDestination(?string $destination) : static + public function setDestination(string $destination) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->destination = $destination; return $this; } /** - * @return null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' + * @return string|null */ public function getDestination() : ?string { @@ -349,17 +349,17 @@ public function hasDestination() : bool } /** - * @param null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' $procedure + * @param string $procedure * @return $this */ - public function setProcedure(?string $procedure) : static + public function setProcedure(string $procedure) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->procedure = $procedure; return $this; } /** - * @return null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' + * @return string|null */ public function getProcedure() : ?string { @@ -375,17 +375,17 @@ public function hasProcedure() : bool } /** - * @param null | 'ANNEX8A' | 'ANNEX8B' | 'NO' $slaAnnex + * @param string $slaAnnex * @return $this */ - public function setSlaAnnex(?string $slaAnnex) : static + public function setSlaAnnex(string $slaAnnex) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return null | 'ANNEX8A' | 'ANNEX8B' | 'NO' + * @return string|null */ public function getSlaAnnex() : ?string { @@ -401,17 +401,17 @@ public function hasSlaAnnex() : bool } /** - * @param null | string $slaCommitment + * @param string $slaCommitment * @return $this */ - public function setSlaCommitment(?string $slaCommitment) : static + public function setSlaCommitment(string $slaCommitment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->slaCommitment = $slaCommitment; return $this; } /** - * @return null | string + * @return string|null */ public function getSlaCommitment() : ?string { @@ -427,17 +427,17 @@ public function hasSlaCommitment() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -453,17 +453,17 @@ public function hasComment() : bool } /** - * @param null | string $onBehalfOf + * @param string $onBehalfOf * @return $this */ - public function setOnBehalfOf(?string $onBehalfOf) : static + public function setOnBehalfOf(string $onBehalfOf) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->onBehalfOf = $onBehalfOf; return $this; } /** - * @return null | string + * @return string|null */ public function getOnBehalfOf() : ?string { @@ -479,17 +479,17 @@ public function hasOnBehalfOf() : bool } /** - * @param null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' $accessibleTo + * @param string $accessibleTo * @return $this */ - public function setAccessibleTo(?string $accessibleTo) : static + public function setAccessibleTo(string $accessibleTo) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' + * @return string|null */ public function getAccessibleTo() : ?string { @@ -505,17 +505,17 @@ public function hasAccessibleTo() : bool } /** - * @param null | string $keyword1 + * @param string $keyword1 * @return $this */ - public function setKeyword1(?string $keyword1) : static + public function setKeyword1(string $keyword1) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->keyword1 = $keyword1; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword1() : ?string { @@ -531,17 +531,17 @@ public function hasKeyword1() : bool } /** - * @param null | string $keyword2 + * @param string $keyword2 * @return $this */ - public function setKeyword2(?string $keyword2) : static + public function setKeyword2(string $keyword2) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->keyword2 = $keyword2; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword2() : ?string { @@ -557,17 +557,17 @@ public function hasKeyword2() : bool } /** - * @param null | string $keyword3 + * @param string $keyword3 * @return $this */ - public function setKeyword3(?string $keyword3) : static + public function setKeyword3(string $keyword3) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->keyword3 = $keyword3; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword3() : ?string { @@ -586,16 +586,16 @@ public function hasKeyword3() : bool * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->contacts = $contacts; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Contacts + * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null */ - public function getContacts() : \OpenEuropa\EPoetry\Request\Type\Contacts + public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts { return $this->contacts; } @@ -612,16 +612,16 @@ public function hasContacts() : bool * @param \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument * @return $this */ - public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument) : static + public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn $originalDocument) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->originalDocument = $originalDocument; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn|null */ - public function getOriginalDocument() : \OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn + public function getOriginalDocument() : ?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentIn { return $this->originalDocument; } @@ -638,16 +638,16 @@ public function hasOriginalDocument() : bool * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : static + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->products = $products; return $this; } /** - * @return \OpenEuropa\EPoetry\Request\Type\Products + * @return \OpenEuropa\EPoetry\Request\Type\Products|null */ - public function getProducts() : \OpenEuropa\EPoetry\Request\Type\Products + public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products { return $this->products; } @@ -661,17 +661,17 @@ public function hasProducts() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments + * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsIn { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn + * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn|null */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocumentsIn { diff --git a/src/Request/Type/RequestDetailsOut.php b/src/Request/Type/RequestDetailsOut.php index 75be916d..ef459626 100644 --- a/src/Request/Type/RequestDetailsOut.php +++ b/src/Request/Type/RequestDetailsOut.php @@ -5,29 +5,29 @@ class RequestDetailsOut { /** - * @var null | string + * @var string */ - private $title = null; + private $title; /** - * @var null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' + * @var string */ - private $workflowCode = null; + private $workflowCode; /** - * @var null | string + * @var string */ - private $internalReference = null; + private $internalReference; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $requestedDeadline = null; + private $requestedDeadline; /** - * @var null | \DateTimeInterface + * @var \DateTimeInterface */ - private $acceptedDeadline = null; + private $acceptedDeadline; /** * @var bool @@ -45,107 +45,107 @@ class RequestDetailsOut private $documentToAdopt; /** - * @var null | string + * @var string */ - private $decideReference = null; + private $decideReference; /** - * @var null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' + * @var string */ - private $destination = null; + private $destination; /** - * @var null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' + * @var string */ - private $procedure = null; + private $procedure; /** - * @var null | 'ANNEX8A' | 'ANNEX8B' | 'NO' + * @var string */ - private $slaAnnex = null; + private $slaAnnex; /** - * @var null | string + * @var string */ - private $slaCommitment = null; + private $slaCommitment; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | string + * @var string */ - private $onBehalfOf = null; + private $onBehalfOf; /** - * @var null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' + * @var string */ - private $accessibleTo = null; + private $accessibleTo; /** - * @var null | string + * @var string */ - private $keyword1 = null; + private $keyword1; /** - * @var null | string + * @var string */ - private $keyword2 = null; + private $keyword2; /** - * @var null | string + * @var string */ - private $keyword3 = null; + private $keyword3; /** - * @var null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' + * @var string */ - private $status = null; + private $status; /** - * @var null | string + * @var string */ - private $rejectMessage = null; + private $rejectMessage; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\Contacts + * @var \OpenEuropa\EPoetry\Request\Type\Contacts */ - private $contacts = null; + private $contacts; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + * @var \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut */ - private $originalDocument = null; + private $originalDocument; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\Products + * @var \OpenEuropa\EPoetry\Request\Type\Products */ - private $products = null; + private $products; /** - * @var null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments + * @var \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments */ - private $auxiliaryDocuments = null; + private $auxiliaryDocuments; /** - * @param null | string $title + * @param string $title * @return $this */ - public function setTitle(?string $title) : static + public function setTitle(string $title) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->title = $title; return $this; } /** - * @return null | string + * @return string|null */ public function getTitle() : ?string { @@ -161,17 +161,17 @@ public function hasTitle() : bool } /** - * @param null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' $workflowCode + * @param string $workflowCode * @return $this */ - public function setWorkflowCode(?string $workflowCode) : static + public function setWorkflowCode(string $workflowCode) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->workflowCode = $workflowCode; return $this; } /** - * @return null | 'WEB' | 'HOTL' | 'STS' | 'PP' | 'QE' + * @return string|null */ public function getWorkflowCode() : ?string { @@ -187,17 +187,17 @@ public function hasWorkflowCode() : bool } /** - * @param null | string $internalReference + * @param string $internalReference * @return $this */ - public function setInternalReference(?string $internalReference) : static + public function setInternalReference(string $internalReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->internalReference = $internalReference; return $this; } /** - * @return null | string + * @return string|null */ public function getInternalReference() : ?string { @@ -213,17 +213,17 @@ public function hasInternalReference() : bool } /** - * @param null | \DateTimeInterface $requestedDeadline + * @param \DateTimeInterface $requestedDeadline * @return $this */ - public function setRequestedDeadline(?\DateTimeInterface $requestedDeadline) : static + public function setRequestedDeadline(\DateTimeInterface $requestedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->requestedDeadline = $requestedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getRequestedDeadline() : ?\DateTimeInterface { @@ -239,17 +239,17 @@ public function hasRequestedDeadline() : bool } /** - * @param null | \DateTimeInterface $acceptedDeadline + * @param \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static + public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return null | \DateTimeInterface + * @return \DateTimeInterface|null */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -268,16 +268,16 @@ public function hasAcceptedDeadline() : bool * @param bool $sensitive * @return $this */ - public function setSensitive(bool $sensitive) : static + public function setSensitive(bool $sensitive) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->sensitive = $sensitive; return $this; } /** - * @return bool + * @return bool|null */ - public function isSensitive() : bool + public function isSensitive() : ?bool { return $this->sensitive; } @@ -294,16 +294,16 @@ public function hasSensitive() : bool * @param bool $sentViaRue * @return $this */ - public function setSentViaRue(bool $sentViaRue) : static + public function setSentViaRue(bool $sentViaRue) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->sentViaRue = $sentViaRue; return $this; } /** - * @return bool + * @return bool|null */ - public function isSentViaRue() : bool + public function isSentViaRue() : ?bool { return $this->sentViaRue; } @@ -320,16 +320,16 @@ public function hasSentViaRue() : bool * @param bool $documentToAdopt * @return $this */ - public function setDocumentToAdopt(bool $documentToAdopt) : static + public function setDocumentToAdopt(bool $documentToAdopt) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->documentToAdopt = $documentToAdopt; return $this; } /** - * @return bool + * @return bool|null */ - public function isDocumentToAdopt() : bool + public function isDocumentToAdopt() : ?bool { return $this->documentToAdopt; } @@ -343,17 +343,17 @@ public function hasDocumentToAdopt() : bool } /** - * @param null | string $decideReference + * @param string $decideReference * @return $this */ - public function setDecideReference(?string $decideReference) : static + public function setDecideReference(string $decideReference) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->decideReference = $decideReference; return $this; } /** - * @return null | string + * @return string|null */ public function getDecideReference() : ?string { @@ -369,17 +369,17 @@ public function hasDecideReference() : bool } /** - * @param null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' $destination + * @param string $destination * @return $this */ - public function setDestination(?string $destination) : static + public function setDestination(string $destination) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->destination = $destination; return $this; } /** - * @return null | 'EM' | 'EXT' | 'IE' | 'INTERNE' | 'JO' | 'PUBLIC' + * @return string|null */ public function getDestination() : ?string { @@ -395,17 +395,17 @@ public function hasDestination() : bool } /** - * @param null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' $procedure + * @param string $procedure * @return $this */ - public function setProcedure(?string $procedure) : static + public function setProcedure(string $procedure) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->procedure = $procedure; return $this; } /** - * @return null | 'DEGHP' | 'NEANT' | 'PROAC' | 'PROCD' | 'PROCE' | 'PROCH' | 'PROCO' | 'REUNAU' | 'REUNCS' + * @return string|null */ public function getProcedure() : ?string { @@ -421,17 +421,17 @@ public function hasProcedure() : bool } /** - * @param null | 'ANNEX8A' | 'ANNEX8B' | 'NO' $slaAnnex + * @param string $slaAnnex * @return $this */ - public function setSlaAnnex(?string $slaAnnex) : static + public function setSlaAnnex(string $slaAnnex) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->slaAnnex = $slaAnnex; return $this; } /** - * @return null | 'ANNEX8A' | 'ANNEX8B' | 'NO' + * @return string|null */ public function getSlaAnnex() : ?string { @@ -447,17 +447,17 @@ public function hasSlaAnnex() : bool } /** - * @param null | string $slaCommitment + * @param string $slaCommitment * @return $this */ - public function setSlaCommitment(?string $slaCommitment) : static + public function setSlaCommitment(string $slaCommitment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->slaCommitment = $slaCommitment; return $this; } /** - * @return null | string + * @return string|null */ public function getSlaCommitment() : ?string { @@ -473,17 +473,17 @@ public function hasSlaCommitment() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -499,17 +499,17 @@ public function hasComment() : bool } /** - * @param null | string $onBehalfOf + * @param string $onBehalfOf * @return $this */ - public function setOnBehalfOf(?string $onBehalfOf) : static + public function setOnBehalfOf(string $onBehalfOf) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->onBehalfOf = $onBehalfOf; return $this; } /** - * @return null | string + * @return string|null */ public function getOnBehalfOf() : ?string { @@ -525,17 +525,17 @@ public function hasOnBehalfOf() : bool } /** - * @param null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' $accessibleTo + * @param string $accessibleTo * @return $this */ - public function setAccessibleTo(?string $accessibleTo) : static + public function setAccessibleTo(string $accessibleTo) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->accessibleTo = $accessibleTo; return $this; } /** - * @return null | 'CONTACTS' | 'UNIT' | 'DIR' | 'DG' | 'ON_BEHALF_DG' + * @return string|null */ public function getAccessibleTo() : ?string { @@ -551,17 +551,17 @@ public function hasAccessibleTo() : bool } /** - * @param null | string $keyword1 + * @param string $keyword1 * @return $this */ - public function setKeyword1(?string $keyword1) : static + public function setKeyword1(string $keyword1) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->keyword1 = $keyword1; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword1() : ?string { @@ -577,17 +577,17 @@ public function hasKeyword1() : bool } /** - * @param null | string $keyword2 + * @param string $keyword2 * @return $this */ - public function setKeyword2(?string $keyword2) : static + public function setKeyword2(string $keyword2) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->keyword2 = $keyword2; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword2() : ?string { @@ -603,17 +603,17 @@ public function hasKeyword2() : bool } /** - * @param null | string $keyword3 + * @param string $keyword3 * @return $this */ - public function setKeyword3(?string $keyword3) : static + public function setKeyword3(string $keyword3) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->keyword3 = $keyword3; return $this; } /** - * @return null | string + * @return string|null */ public function getKeyword3() : ?string { @@ -629,17 +629,17 @@ public function hasKeyword3() : bool } /** - * @param null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' $status + * @param string $status * @return $this */ - public function setStatus(?string $status) : static + public function setStatus(string $status) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->status = $status; return $this; } /** - * @return null | 'SenttoDGT' | 'Received' | 'Accepted' | 'Rejected' | 'Cancelled' | 'Suspended' | 'Executed' | 'ToBeValidated' + * @return string|null */ public function getStatus() : ?string { @@ -655,17 +655,17 @@ public function hasStatus() : bool } /** - * @param null | string $rejectMessage + * @param string $rejectMessage * @return $this */ - public function setRejectMessage(?string $rejectMessage) : static + public function setRejectMessage(string $rejectMessage) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->rejectMessage = $rejectMessage; return $this; } /** - * @return null | string + * @return string|null */ public function getRejectMessage() : ?string { @@ -681,17 +681,17 @@ public function hasRejectMessage() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { @@ -707,17 +707,17 @@ public function hasApplicationName() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\Contacts $contacts + * @param \OpenEuropa\EPoetry\Request\Type\Contacts $contacts * @return $this */ - public function setContacts(?\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : static + public function setContacts(\OpenEuropa\EPoetry\Request\Type\Contacts $contacts) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->contacts = $contacts; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\Contacts + * @return \OpenEuropa\EPoetry\Request\Type\Contacts|null */ public function getContacts() : ?\OpenEuropa\EPoetry\Request\Type\Contacts { @@ -733,17 +733,17 @@ public function hasContacts() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument + * @param \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument * @return $this */ - public function setOriginalDocument(?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : static + public function setOriginalDocument(\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut $originalDocument) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->originalDocument = $originalDocument; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut + * @return \OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut|null */ public function getOriginalDocument() : ?\OpenEuropa\EPoetry\Request\Type\OriginalDocumentOut { @@ -759,17 +759,17 @@ public function hasOriginalDocument() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\Products $products + * @param \OpenEuropa\EPoetry\Request\Type\Products $products * @return $this */ - public function setProducts(?\OpenEuropa\EPoetry\Request\Type\Products $products) : static + public function setProducts(\OpenEuropa\EPoetry\Request\Type\Products $products) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->products = $products; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\Products + * @return \OpenEuropa\EPoetry\Request\Type\Products|null */ public function getProducts() : ?\OpenEuropa\EPoetry\Request\Type\Products { @@ -785,17 +785,17 @@ public function hasProducts() : bool } /** - * @param null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments + * @param \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments * @return $this */ - public function setAuxiliaryDocuments(?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : static + public function setAuxiliaryDocuments(\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments $auxiliaryDocuments) : \OpenEuropa\EPoetry\Request\Type\RequestDetailsOut { $this->auxiliaryDocuments = $auxiliaryDocuments; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments + * @return \OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments|null */ public function getAuxiliaryDocuments() : ?\OpenEuropa\EPoetry\Request\Type\AuxiliaryDocuments { diff --git a/src/Request/Type/RequestReference.php b/src/Request/Type/RequestReference.php deleted file mode 100644 index cc027e8a..00000000 --- a/src/Request/Type/RequestReference.php +++ /dev/null @@ -1,100 +0,0 @@ -dossier = $dossier; - return $this; - } - - /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference - */ - public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference - { - return $this->dossier; - } - - /** - * @return bool - */ - public function hasDossier() : bool - { - return !empty($this->dossier); - } - - /** - * @param null | string $productType - * @return $this - */ - public function setProductType(?string $productType) : static - { - $this->productType = $productType; - return $this; - } - - /** - * @return null | string - */ - public function getProductType() : ?string - { - return $this->productType; - } - - /** - * @return bool - */ - public function hasProductType() : bool - { - return !empty($this->productType); - } - - /** - * @param null | int $part - * @return $this - */ - public function setPart(?int $part) : static - { - $this->part = $part; - return $this; - } - - /** - * @return null | int - */ - public function getPart() : ?int - { - return $this->part; - } - - /** - * @return bool - */ - public function hasPart() : bool - { - return !empty($this->part); - } -} - diff --git a/src/Request/Type/RequestReferenceIn.php b/src/Request/Type/RequestReferenceIn.php index f8fe689b..598be647 100644 --- a/src/Request/Type/RequestReferenceIn.php +++ b/src/Request/Type/RequestReferenceIn.php @@ -5,32 +5,32 @@ class RequestReferenceIn { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier = null; + private $dossier; /** - * @var null | string + * @var string */ - private $productType = null; + private $productType; /** - * @var null | int + * @var int */ - private $part = null; + private $part; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { $this->dossier = $dossier; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -46,17 +46,17 @@ public function hasDossier() : bool } /** - * @param null | string $productType + * @param string $productType * @return $this */ - public function setProductType(?string $productType) : static + public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { $this->productType = $productType; return $this; } /** - * @return null | string + * @return string|null */ public function getProductType() : ?string { @@ -72,17 +72,17 @@ public function hasProductType() : bool } /** - * @param null | int $part + * @param int $part * @return $this */ - public function setPart(?int $part) : static + public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceIn { $this->part = $part; return $this; } /** - * @return null | int + * @return int|null */ public function getPart() : ?int { diff --git a/src/Request/Type/RequestReferenceOut.php b/src/Request/Type/RequestReferenceOut.php index 2c1e7013..09db56f5 100644 --- a/src/Request/Type/RequestReferenceOut.php +++ b/src/Request/Type/RequestReferenceOut.php @@ -5,37 +5,37 @@ class RequestReferenceOut { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @var \OpenEuropa\EPoetry\Request\Type\DossierReference */ - private $dossier = null; + private $dossier; /** - * @var null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' + * @var string */ - private $productType = null; + private $productType; /** - * @var null | int + * @var int */ - private $part = null; + private $part; /** - * @var null | int + * @var int */ - private $version = null; + private $version; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier + * @param \OpenEuropa\EPoetry\Request\Type\DossierReference $dossier * @return $this */ - public function setDossier(?\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : static + public function setDossier(\OpenEuropa\EPoetry\Request\Type\DossierReference $dossier) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { $this->dossier = $dossier; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\DossierReference + * @return \OpenEuropa\EPoetry\Request\Type\DossierReference|null */ public function getDossier() : ?\OpenEuropa\EPoetry\Request\Type\DossierReference { @@ -51,17 +51,17 @@ public function hasDossier() : bool } /** - * @param null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' $productType + * @param string $productType * @return $this */ - public function setProductType(?string $productType) : static + public function setProductType(string $productType) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { $this->productType = $productType; return $this; } /** - * @return null | 'ERR' | 'EXT' | 'EDT' | 'TRA' | 'RSO' | 'RSE' | 'REV' | 'PER' | 'SPO' + * @return string|null */ public function getProductType() : ?string { @@ -77,17 +77,17 @@ public function hasProductType() : bool } /** - * @param null | int $part + * @param int $part * @return $this */ - public function setPart(?int $part) : static + public function setPart(int $part) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { $this->part = $part; return $this; } /** - * @return null | int + * @return int|null */ public function getPart() : ?int { @@ -103,17 +103,17 @@ public function hasPart() : bool } /** - * @param null | int $version + * @param int $version * @return $this */ - public function setVersion(?int $version) : static + public function setVersion(int $version) : \OpenEuropa\EPoetry\Request\Type\RequestReferenceOut { $this->version = $version; return $this; } /** - * @return null | int + * @return int|null */ public function getVersion() : ?int { diff --git a/src/Request/Type/ResubmitRequest.php b/src/Request/Type/ResubmitRequest.php index 5404511a..3f751550 100644 --- a/src/Request/Type/ResubmitRequest.php +++ b/src/Request/Type/ResubmitRequest.php @@ -7,32 +7,32 @@ class ResubmitRequest implements RequestInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn */ - private $resubmitRequest = null; + private $resubmitRequest; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @var null | string + * @var string */ - private $templateName = null; + private $templateName; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest * @return $this */ - public function setResubmitRequest(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : static + public function setResubmitRequest(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn $resubmitRequest) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest { $this->resubmitRequest = $resubmitRequest; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn|null */ public function getResubmitRequest() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestIn { @@ -48,17 +48,17 @@ public function hasResubmitRequest() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { @@ -74,17 +74,17 @@ public function hasApplicationName() : bool } /** - * @param null | string $templateName + * @param string $templateName * @return $this */ - public function setTemplateName(?string $templateName) : static + public function setTemplateName(string $templateName) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequest { $this->templateName = $templateName; return $this; } /** - * @return null | string + * @return string|null */ public function getTemplateName() : ?string { diff --git a/src/Request/Type/ResubmitRequestResponse.php b/src/Request/Type/ResubmitRequestResponse.php index 9282e538..13e4084d 100644 --- a/src/Request/Type/ResubmitRequestResponse.php +++ b/src/Request/Type/ResubmitRequestResponse.php @@ -7,22 +7,22 @@ class ResubmitRequestResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @var \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return + * @param \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut $return) : \OpenEuropa\EPoetry\Request\Type\ResubmitRequestResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut + * @return \OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\LinguisticRequestOut { diff --git a/src/Request/Type/SrcDocumentIn.php b/src/Request/Type/SrcDocumentIn.php index a1e6d464..f807bdae 100644 --- a/src/Request/Type/SrcDocumentIn.php +++ b/src/Request/Type/SrcDocumentIn.php @@ -5,32 +5,32 @@ class SrcDocumentIn { /** - * @var null | string + * @var string */ - private $fileName = null; + private $fileName; /** - * @var null | string + * @var string */ - private $comment = null; + private $comment; /** - * @var null | mixed + * @var string */ - private $content = null; + private $content; /** - * @param null | string $fileName + * @param string $fileName * @return $this */ - public function setFileName(?string $fileName) : static + public function setFileName(string $fileName) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn { $this->fileName = $fileName; return $this; } /** - * @return null | string + * @return string|null */ public function getFileName() : ?string { @@ -46,17 +46,17 @@ public function hasFileName() : bool } /** - * @param null | string $comment + * @param string $comment * @return $this */ - public function setComment(?string $comment) : static + public function setComment(string $comment) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn { $this->comment = $comment; return $this; } /** - * @return null | string + * @return string|null */ public function getComment() : ?string { @@ -72,19 +72,19 @@ public function hasComment() : bool } /** - * @param null | mixed $content + * @param string $content * @return $this */ - public function setContent(mixed $content) : static + public function setContent(string $content) : \OpenEuropa\EPoetry\Request\Type\SrcDocumentIn { $this->content = $content; return $this; } /** - * @return null | mixed + * @return string|null */ - public function getContent() : mixed + public function getContent() : ?string { return $this->content; } diff --git a/src/Request/Type/TraxDocuments.php b/src/Request/Type/TraxDocuments.php index b8d5dd00..a70a5eb8 100644 --- a/src/Request/Type/TraxDocuments.php +++ b/src/Request/Type/TraxDocuments.php @@ -5,22 +5,22 @@ class TraxDocuments { /** - * @var array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @var \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array */ private $document = []; /** - * @param array, DocumentIn[]> $document + * @param DocumentIn[] $document * @return $this */ - public function setDocument(array $document) : static + public function setDocument(array $document) : \OpenEuropa\EPoetry\Request\Type\TraxDocuments { $this->document = $document; return $this; } /** - * @return array, \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array> + * @return \OpenEuropa\EPoetry\Request\Type\DocumentIn[]|array|null */ public function getDocument() : ?array { diff --git a/src/Request/Type/UnsupportedEncodingException.php b/src/Request/Type/UnsupportedEncodingException.php index c5cfdd4f..e5ecb4e9 100644 --- a/src/Request/Type/UnsupportedEncodingException.php +++ b/src/Request/Type/UnsupportedEncodingException.php @@ -5,22 +5,22 @@ class UnsupportedEncodingException { /** - * @var null | string + * @var string */ - private $message = null; + private $message; /** - * @param null | string $message + * @param string $message * @return $this */ - public function setMessage(?string $message) : static + public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\UnsupportedEncodingException { $this->message = $message; return $this; } /** - * @return null | string + * @return string|null */ public function getMessage() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrl.php b/src/Request/Type/UpdateCallbackUrl.php index dc16841e..8388fac3 100644 --- a/src/Request/Type/UpdateCallbackUrl.php +++ b/src/Request/Type/UpdateCallbackUrl.php @@ -7,27 +7,27 @@ class UpdateCallbackUrl implements RequestInterface { /** - * @var null | string + * @var string */ - private $callbackUrl = null; + private $callbackUrl; /** - * @var null | string + * @var string */ - private $applicationName = null; + private $applicationName; /** - * @param null | string $callbackUrl + * @param string $callbackUrl * @return $this */ - public function setCallbackUrl(?string $callbackUrl) : static + public function setCallbackUrl(string $callbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl { $this->callbackUrl = $callbackUrl; return $this; } /** - * @return null | string + * @return string|null */ public function getCallbackUrl() : ?string { @@ -43,17 +43,17 @@ public function hasCallbackUrl() : bool } /** - * @param null | string $applicationName + * @param string $applicationName * @return $this */ - public function setApplicationName(?string $applicationName) : static + public function setApplicationName(string $applicationName) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrl { $this->applicationName = $applicationName; return $this; } /** - * @return null | string + * @return string|null */ public function getApplicationName() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrlOut.php b/src/Request/Type/UpdateCallbackUrlOut.php index 15ff75b1..4c7cf9db 100644 --- a/src/Request/Type/UpdateCallbackUrlOut.php +++ b/src/Request/Type/UpdateCallbackUrlOut.php @@ -10,39 +10,39 @@ class UpdateCallbackUrlOut private $success; /** - * @var null | string + * @var string */ - private $oldCallbackUrl = null; + private $oldCallbackUrl; /** - * @var null | string + * @var string */ - private $newCallbackUrl = null; + private $newCallbackUrl; /** - * @var null | string + * @var string */ - private $application = null; + private $application; /** - * @var null | string + * @var string */ - private $message = null; + private $message; /** * @param bool $success * @return $this */ - public function setSuccess(bool $success) : static + public function setSuccess(bool $success) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { $this->success = $success; return $this; } /** - * @return bool + * @return bool|null */ - public function isSuccess() : bool + public function isSuccess() : ?bool { return $this->success; } @@ -56,17 +56,17 @@ public function hasSuccess() : bool } /** - * @param null | string $oldCallbackUrl + * @param string $oldCallbackUrl * @return $this */ - public function setOldCallbackUrl(?string $oldCallbackUrl) : static + public function setOldCallbackUrl(string $oldCallbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { $this->oldCallbackUrl = $oldCallbackUrl; return $this; } /** - * @return null | string + * @return string|null */ public function getOldCallbackUrl() : ?string { @@ -82,17 +82,17 @@ public function hasOldCallbackUrl() : bool } /** - * @param null | string $newCallbackUrl + * @param string $newCallbackUrl * @return $this */ - public function setNewCallbackUrl(?string $newCallbackUrl) : static + public function setNewCallbackUrl(string $newCallbackUrl) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { $this->newCallbackUrl = $newCallbackUrl; return $this; } /** - * @return null | string + * @return string|null */ public function getNewCallbackUrl() : ?string { @@ -108,17 +108,17 @@ public function hasNewCallbackUrl() : bool } /** - * @param null | string $application + * @param string $application * @return $this */ - public function setApplication(?string $application) : static + public function setApplication(string $application) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { $this->application = $application; return $this; } /** - * @return null | string + * @return string|null */ public function getApplication() : ?string { @@ -134,17 +134,17 @@ public function hasApplication() : bool } /** - * @param null | string $message + * @param string $message * @return $this */ - public function setMessage(?string $message) : static + public function setMessage(string $message) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { $this->message = $message; return $this; } /** - * @return null | string + * @return string|null */ public function getMessage() : ?string { diff --git a/src/Request/Type/UpdateCallbackUrlResponse.php b/src/Request/Type/UpdateCallbackUrlResponse.php index 90044de6..b984ac67 100644 --- a/src/Request/Type/UpdateCallbackUrlResponse.php +++ b/src/Request/Type/UpdateCallbackUrlResponse.php @@ -7,22 +7,22 @@ class UpdateCallbackUrlResponse implements ResultInterface { /** - * @var null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + * @var \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut */ - private $return = null; + private $return; /** - * @param null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return + * @param \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return * @return $this */ - public function setReturn(?\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : static + public function setReturn(\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut $return) : \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlResponse { $this->return = $return; return $this; } /** - * @return null | \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut + * @return \OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut|null */ public function getReturn() : ?\OpenEuropa\EPoetry\Request\Type\UpdateCallbackUrlOut { From 6acf1ece1e76bb121840827cf9905ed2ea9fe777 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 10:13:09 +0100 Subject: [PATCH 08/14] EWPP-4991: Run tests in separate suites. --- .github/workflows/ci.yml | 73 +++++++++++++++++++++++++--------------- phpunit.xml.dist | 25 ++++++++++++-- 2 files changed, 69 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b4803f7..ba57bfa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php_version: ["8.1", "8.3"] + php_version: ["8.3"] composer_command: ["composer install"] env: PHP_VERSION: ${{ matrix.php_version }} @@ -25,30 +25,49 @@ jobs: - name: Build dependencies run: docker-compose exec -T php ${{ matrix.composer_command }} - - name: Run tests - run: docker-compose exec -T php ./vendor/bin/phpunit +# - name: Run tests +# run: docker-compose exec -T php ./vendor/bin/phpunit + # While porting to 3.x run each test suite separately. + # We will remove this one the job is done. + - name: Authentication + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Authentication" + - name: CodeGenerator + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite CodeGenerator" + - name: ExtSoapEngine + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite ExtSoapEngine" + - name: Notification + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Notification" + - name: Request + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Request" + - name: TicketValidation + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite TicketValidation" + - name: RequestClientFactoryTest + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite RequestClientFactoryTest" + - name: SerializerTest + run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite SerializerTest" - code-sniffer: - runs-on: ubuntu-latest - strategy: - matrix: - php_version: ["8.1", "8.3"] - env: - PHP_VERSION: ${{ matrix.php_version }} - steps: - - name: Clone repository - uses: actions/checkout@v2 - - - name: Install Docker Compose - run: | - sudo apt-get update - sudo apt-get install -y docker-compose - - - name: Start services with Docker Compose - run: docker-compose up -d - - - name: Install dependencies - run: docker-compose exec -T php composer install - - - name: Run code sniffer - run: docker-compose exec -T php ./vendor/bin/grumphp run \ No newline at end of file +# We will run codesniffer at the end of our refactoring effort. +# code-sniffer: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# php_version: ["8.3"] +# env: +# PHP_VERSION: ${{ matrix.php_version }} +# steps: +# - name: Clone repository +# uses: actions/checkout@v2 +# +# - name: Install Docker Compose +# run: | +# sudo apt-get update +# sudo apt-get install -y docker-compose +# +# - name: Start services with Docker Compose +# run: docker-compose up -d +# +# - name: Install dependencies +# run: docker-compose exec -T php composer install +# +# - name: Run code sniffer +# run: docker-compose exec -T php ./vendor/bin/grumphp run \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 75550e73..8bb1a76b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,8 +6,29 @@ - - ./tests/ + + tests/Authentication + + + tests/CodeGenerator + + + tests/ExtSoapEngine + + + tests/Notification + + + tests/Request + + + tests/TicketValidation + + + tests/RequestClientFactoryTest.php + + + tests/SerializerTest.php From 2990ee54e36e2359fcb946cb44323bb123e7889c Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 10:21:27 +0100 Subject: [PATCH 09/14] EWPP-4991: Reset ConfigProcessor and regenerate notifications. --- src/CodeGenerator/ConfigProcessor.php | 27 ++++++++ src/Notification/NotificationClassmap.php | 1 + src/Notification/Type/DgtNotification.php | 60 +++++++++--------- .../Type/DgtNotificationResult.php | 16 ++--- src/Notification/Type/LinguisticRequest.php | 20 +++--- src/Notification/Type/Product.php | 62 +++++++++---------- src/Notification/Type/ProductReference.php | 20 +++--- src/Notification/Type/ReceiveNotification.php | 14 ++--- .../Type/ReceiveNotificationResponse.php | 14 ++--- src/Notification/Type/RequestReference.php | 44 ++++++------- 10 files changed, 151 insertions(+), 127 deletions(-) diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 883c4964..93d786cf 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -28,6 +28,33 @@ class ConfigProcessor */ public static function addRules(Config $config, array $specialClassesAndProperties = [], array $overridePropertyTypes = []) { + $rules = [ + new Rules\AssembleRule(new Assembler\PropertyAssembler( + Assembler\PropertyAssemblerOptions::create() + ->withTypeHints(false) + ) + ), + new Rules\AssembleRule(new Assembler\FluentSetterAssembler( + Assembler\FluentSetterAssemblerOptions::create() + ->withTypeHints() + ) + ), + new Rules\AssembleRule(new Assembler\GetterAssembler( + Assembler\GetterAssemblerOptions::create() + ->withReturnType() + ->withBoolGetters() + ) + ), + new Rules\AssembleRule(new OpenEuropa\Assembler\HasPropertyAssembler()), + new Rules\AssembleRule(new Assembler\ClassMapAssembler()), + new Rules\AssembleRule(new Assembler\ClientConstructorAssembler()), + new Rules\AssembleRule(new Assembler\ClientMethodAssembler()), + ]; + + $config->setRuleSet(new Rules\RuleSet($rules)); + + return; + // Set all property visibility to "protected". // We have to do this as the SOAP handler will erroneously create duplicate // public properties when a value object extends another one with those diff --git a/src/Notification/NotificationClassmap.php b/src/Notification/NotificationClassmap.php index 84b736e9..86380f6d 100644 --- a/src/Notification/NotificationClassmap.php +++ b/src/Notification/NotificationClassmap.php @@ -22,3 +22,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } + diff --git a/src/Notification/Type/DgtNotification.php b/src/Notification/Type/DgtNotification.php index 70c58807..5eac556c 100644 --- a/src/Notification/Type/DgtNotification.php +++ b/src/Notification/Type/DgtNotification.php @@ -5,47 +5,47 @@ class DgtNotification { /** - * @var string + * @var null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' */ - private $notificationType; + private $notificationType = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + * @var null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest */ - private $linguisticRequest; + private $linguisticRequest = null; /** - * @var \OpenEuropa\EPoetry\Notification\Type\Product + * @var null | \OpenEuropa\EPoetry\Notification\Type\Product */ - private $product; + private $product = null; /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** - * @var string + * @var null | string */ - private $planningAgent; + private $planningAgent = null; /** - * @var string + * @var null | string */ - private $planningSector; + private $planningSector = null; /** - * @param string $notificationType + * @param null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' $notificationType * @return $this */ - public function setNotificationType(string $notificationType) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setNotificationType(?string $notificationType) : static { $this->notificationType = $notificationType; return $this; } /** - * @return string|null + * @return null | 'RequestStatusChange' | 'ProductStatusChange' | 'ProductDelivery' | 'CorrectionStatusChange' */ public function getNotificationType() : ?string { @@ -61,17 +61,17 @@ public function hasNotificationType() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest + * @param null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest * @return $this */ - public function setLinguisticRequest(\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setLinguisticRequest(?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest $linguisticRequest) : static { $this->linguisticRequest = $linguisticRequest; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest */ public function getLinguisticRequest() : ?\OpenEuropa\EPoetry\Notification\Type\LinguisticRequest { @@ -87,17 +87,17 @@ public function hasLinguisticRequest() : bool } /** - * @param \OpenEuropa\EPoetry\Notification\Type\Product $product + * @param null | \OpenEuropa\EPoetry\Notification\Type\Product $product * @return $this */ - public function setProduct(\OpenEuropa\EPoetry\Notification\Type\Product $product) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setProduct(?\OpenEuropa\EPoetry\Notification\Type\Product $product) : static { $this->product = $product; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\Product|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\Product */ public function getProduct() : ?\OpenEuropa\EPoetry\Notification\Type\Product { @@ -113,17 +113,17 @@ public function hasProduct() : bool } /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { @@ -139,17 +139,17 @@ public function hasMessage() : bool } /** - * @param string $planningAgent + * @param null | string $planningAgent * @return $this */ - public function setPlanningAgent(string $planningAgent) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setPlanningAgent(?string $planningAgent) : static { $this->planningAgent = $planningAgent; return $this; } /** - * @return string|null + * @return null | string */ public function getPlanningAgent() : ?string { @@ -165,17 +165,17 @@ public function hasPlanningAgent() : bool } /** - * @param string $planningSector + * @param null | string $planningSector * @return $this */ - public function setPlanningSector(string $planningSector) : \OpenEuropa\EPoetry\Notification\Type\DgtNotification + public function setPlanningSector(?string $planningSector) : static { $this->planningSector = $planningSector; return $this; } /** - * @return string|null + * @return null | string */ public function getPlanningSector() : ?string { diff --git a/src/Notification/Type/DgtNotificationResult.php b/src/Notification/Type/DgtNotificationResult.php index 536fcdb2..cc6fe898 100644 --- a/src/Notification/Type/DgtNotificationResult.php +++ b/src/Notification/Type/DgtNotificationResult.php @@ -10,24 +10,24 @@ class DgtNotificationResult private $success; /** - * @var string + * @var null | string */ - private $message; + private $message = null; /** * @param bool $success * @return $this */ - public function setSuccess(bool $success) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + public function setSuccess(bool $success) : static { $this->success = $success; return $this; } /** - * @return bool|null + * @return bool */ - public function isSuccess() : ?bool + public function isSuccess() : bool { return $this->success; } @@ -41,17 +41,17 @@ public function hasSuccess() : bool } /** - * @param string $message + * @param null | string $message * @return $this */ - public function setMessage(string $message) : \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + public function setMessage(?string $message) : static { $this->message = $message; return $this; } /** - * @return string|null + * @return null | string */ public function getMessage() : ?string { diff --git a/src/Notification/Type/LinguisticRequest.php b/src/Notification/Type/LinguisticRequest.php index 054aae0c..e52bc6f5 100644 --- a/src/Notification/Type/LinguisticRequest.php +++ b/src/Notification/Type/LinguisticRequest.php @@ -5,27 +5,27 @@ class LinguisticRequest { /** - * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference; + private $requestReference = null; /** - * @var string + * @var null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' */ - private $status; + private $status = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param string $status + * @param null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\LinguisticRequest + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return null | 'Accepted' | 'Rejected' | 'Executed' | 'Suspended' | 'Cancelled' | 'Validated' */ public function getStatus() : ?string { diff --git a/src/Notification/Type/Product.php b/src/Notification/Type/Product.php index 1d5b6e01..7a77329d 100644 --- a/src/Notification/Type/Product.php +++ b/src/Notification/Type/Product.php @@ -5,47 +5,47 @@ class Product { /** - * @var \OpenEuropa\EPoetry\Notification\Type\ProductReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\ProductReference */ - private $productReference; + private $productReference = null; /** - * @var string + * @var null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' */ - private $status; + private $status = null; /** - * @var \DateTimeInterface + * @var null | \DateTimeInterface */ - private $acceptedDeadline; + private $acceptedDeadline = null; /** - * @var string + * @var null | mixed */ - private $file; + private $file = null; /** - * @var string + * @var null | string */ - private $name; + private $name = null; /** - * @var string + * @var null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ - private $format; + private $format = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference * @return $this */ - public function setProductReference(\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setProductReference(?\OpenEuropa\EPoetry\Notification\Type\ProductReference $productReference) : static { $this->productReference = $productReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\ProductReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\ProductReference */ public function getProductReference() : ?\OpenEuropa\EPoetry\Notification\Type\ProductReference { @@ -61,17 +61,17 @@ public function hasProductReference() : bool } /** - * @param string $status + * @param null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' $status * @return $this */ - public function setStatus(string $status) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setStatus(?string $status) : static { $this->status = $status; return $this; } /** - * @return string|null + * @return null | 'Accepted' | 'Closed' | 'Ongoing' | 'ReadyToBeSent' | 'Suspended' | 'Cancelled' | 'Sent' | 'Rejected' | 'Requested' | 'Invalid' */ public function getStatus() : ?string { @@ -87,17 +87,17 @@ public function hasStatus() : bool } /** - * @param \DateTimeInterface $acceptedDeadline + * @param null | \DateTimeInterface $acceptedDeadline * @return $this */ - public function setAcceptedDeadline(\DateTimeInterface $acceptedDeadline) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setAcceptedDeadline(?\DateTimeInterface $acceptedDeadline) : static { $this->acceptedDeadline = $acceptedDeadline; return $this; } /** - * @return \DateTimeInterface|null + * @return null | \DateTimeInterface */ public function getAcceptedDeadline() : ?\DateTimeInterface { @@ -113,19 +113,19 @@ public function hasAcceptedDeadline() : bool } /** - * @param string $file + * @param null | mixed $file * @return $this */ - public function setFile(string $file) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setFile(mixed $file) : static { $this->file = $file; return $this; } /** - * @return string|null + * @return null | mixed */ - public function getFile() : ?string + public function getFile() : mixed { return $this->file; } @@ -139,17 +139,17 @@ public function hasFile() : bool } /** - * @param string $name + * @param null | string $name * @return $this */ - public function setName(string $name) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setName(?string $name) : static { $this->name = $name; return $this; } /** - * @return string|null + * @return null | string */ public function getName() : ?string { @@ -165,17 +165,17 @@ public function hasName() : bool } /** - * @param string $format + * @param null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' $format * @return $this */ - public function setFormat(string $format) : \OpenEuropa\EPoetry\Notification\Type\Product + public function setFormat(?string $format) : static { $this->format = $format; return $this; } /** - * @return string|null + * @return null | 'XLS' | 'XLSX' | 'DOC' | 'DOCX' | 'PPTX' | 'PPT' | 'HTM' | 'HTML' | 'RTF' | 'VSD' | 'PDF' | 'TIF' | 'ZIP' | 'TIFF' | 'TXT' | 'XML' | 'XMW' */ public function getFormat() : ?string { diff --git a/src/Notification/Type/ProductReference.php b/src/Notification/Type/ProductReference.php index c254941f..b5a74832 100644 --- a/src/Notification/Type/ProductReference.php +++ b/src/Notification/Type/ProductReference.php @@ -5,27 +5,27 @@ class ProductReference { /** - * @var \OpenEuropa\EPoetry\Notification\Type\RequestReference + * @var null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ - private $requestReference; + private $requestReference = null; /** - * @var string + * @var null | string */ - private $language; + private $language = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference + * @param null | \OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference * @return $this */ - public function setRequestReference(\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : \OpenEuropa\EPoetry\Notification\Type\ProductReference + public function setRequestReference(?\OpenEuropa\EPoetry\Notification\Type\RequestReference $requestReference) : static { $this->requestReference = $requestReference; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\RequestReference|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\RequestReference */ public function getRequestReference() : ?\OpenEuropa\EPoetry\Notification\Type\RequestReference { @@ -41,17 +41,17 @@ public function hasRequestReference() : bool } /** - * @param string $language + * @param null | string $language * @return $this */ - public function setLanguage(string $language) : \OpenEuropa\EPoetry\Notification\Type\ProductReference + public function setLanguage(?string $language) : static { $this->language = $language; return $this; } /** - * @return string|null + * @return null | string */ public function getLanguage() : ?string { diff --git a/src/Notification/Type/ReceiveNotification.php b/src/Notification/Type/ReceiveNotification.php index afee45fa..9a8453c0 100644 --- a/src/Notification/Type/ReceiveNotification.php +++ b/src/Notification/Type/ReceiveNotification.php @@ -2,27 +2,25 @@ namespace OpenEuropa\EPoetry\Notification\Type; -use Phpro\SoapClient\Type\RequestInterface; - -class ReceiveNotification implements RequestInterface +class ReceiveNotification { /** - * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotification + * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification */ - private $notification; + private $notification = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification + * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification * @return $this */ - public function setNotification(\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotification + public function setNotification(?\OpenEuropa\EPoetry\Notification\Type\DgtNotification $notification) : static { $this->notification = $notification; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotification|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotification */ public function getNotification() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotification { diff --git a/src/Notification/Type/ReceiveNotificationResponse.php b/src/Notification/Type/ReceiveNotificationResponse.php index 9fc3a261..9d0b0db3 100644 --- a/src/Notification/Type/ReceiveNotificationResponse.php +++ b/src/Notification/Type/ReceiveNotificationResponse.php @@ -2,27 +2,25 @@ namespace OpenEuropa\EPoetry\Notification\Type; -use Phpro\SoapClient\Type\ResultInterface; - -class ReceiveNotificationResponse implements ResultInterface +class ReceiveNotificationResponse { /** - * @var \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult + * @var null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult */ - private $return; + private $return = null; /** - * @param \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return + * @param null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return * @return $this */ - public function setReturn(\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : \OpenEuropa\EPoetry\Notification\Type\ReceiveNotificationResponse + public function setReturn(?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult $return) : static { $this->return = $return; return $this; } /** - * @return \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult|null + * @return null | \OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult */ public function getReturn() : ?\OpenEuropa\EPoetry\Notification\Type\DgtNotificationResult { diff --git a/src/Notification/Type/RequestReference.php b/src/Notification/Type/RequestReference.php index 642e1de8..a6ca1ff4 100644 --- a/src/Notification/Type/RequestReference.php +++ b/src/Notification/Type/RequestReference.php @@ -5,9 +5,9 @@ class RequestReference { /** - * @var string + * @var null | string */ - private $requesterCode; + private $requesterCode = null; /** * @var int @@ -30,22 +30,22 @@ class RequestReference private $version; /** - * @var string + * @var null | string */ - private $productType; + private $productType = null; /** - * @param string $requesterCode + * @param null | string $requesterCode * @return $this */ - public function setRequesterCode(string $requesterCode) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setRequesterCode(?string $requesterCode) : static { $this->requesterCode = $requesterCode; return $this; } /** - * @return string|null + * @return null | string */ public function getRequesterCode() : ?string { @@ -64,16 +64,16 @@ public function hasRequesterCode() : bool * @param int $year * @return $this */ - public function setYear(int $year) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setYear(int $year) : static { $this->year = $year; return $this; } /** - * @return int|null + * @return int */ - public function getYear() : ?int + public function getYear() : int { return $this->year; } @@ -90,16 +90,16 @@ public function hasYear() : bool * @param int $number * @return $this */ - public function setNumber(int $number) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setNumber(int $number) : static { $this->number = $number; return $this; } /** - * @return int|null + * @return int */ - public function getNumber() : ?int + public function getNumber() : int { return $this->number; } @@ -116,16 +116,16 @@ public function hasNumber() : bool * @param int $part * @return $this */ - public function setPart(int $part) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setPart(int $part) : static { $this->part = $part; return $this; } /** - * @return int|null + * @return int */ - public function getPart() : ?int + public function getPart() : int { return $this->part; } @@ -142,16 +142,16 @@ public function hasPart() : bool * @param int $version * @return $this */ - public function setVersion(int $version) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setVersion(int $version) : static { $this->version = $version; return $this; } /** - * @return int|null + * @return int */ - public function getVersion() : ?int + public function getVersion() : int { return $this->version; } @@ -165,17 +165,17 @@ public function hasVersion() : bool } /** - * @param string $productType + * @param null | string $productType * @return $this */ - public function setProductType(string $productType) : \OpenEuropa\EPoetry\Notification\Type\RequestReference + public function setProductType(?string $productType) : static { $this->productType = $productType; return $this; } /** - * @return string|null + * @return null | string */ public function getProductType() : ?string { From a8050b7b5752e9fd83d386ce88278682cd35a866 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 11:37:31 +0100 Subject: [PATCH 10/14] EWPP-4991: Fix notifications tests. --- .../receiveNotificationValidation.yaml | 68 +++++++++++-------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/tests/Notification/fixtures/receiveNotificationValidation.yaml b/tests/Notification/fixtures/receiveNotificationValidation.yaml index 22ac1cb0..32034370 100644 --- a/tests/Notification/fixtures/receiveNotificationValidation.yaml +++ b/tests/Notification/fixtures/receiveNotificationValidation.yaml @@ -1,6 +1,14 @@ tests: - data: notification: + expectations: + assertions: + - is_a(violations, '\\Symfony\\Component\\Validator\\ConstraintViolationListInterface') + - count(violations) === 1 + - violations.get(0).getMessage() === 'This value should not be null.' + - data: + notification: + notificationType: expectations: assertions: - is_a(violations, '\\Symfony\\Component\\Validator\\ConstraintViolationListInterface') @@ -27,23 +35,24 @@ tests: - count(violations) === 1 - violations.get(0).getMessage() === '"linguisticRequest" value is required for "RequestStatusChange" notification type.' - violations.get(0).getPropertyPath() === 'notification.notificationType' - - data: - notification: - notificationType: RequestStatusChange - linguisticRequest: - status: Accepted - requestReference: - expectations: - assertions: - - count(violations) === 4 - - violations.get(0).getMessage() === 'This value should not be blank.' - - violations.get(0).getPropertyPath() === 'notification.linguisticRequest.requestReference.year' - - violations.get(1).getMessage() === 'This value should not be blank.' - - violations.get(1).getPropertyPath() === 'notification.linguisticRequest.requestReference.number' - - violations.get(2).getMessage() === 'This value should not be blank.' - - violations.get(2).getPropertyPath() === 'notification.linguisticRequest.requestReference.part' - - violations.get(3).getMessage() === 'This value should not be blank.' - - violations.get(3).getPropertyPath() === 'notification.linguisticRequest.requestReference.version' +# @todo re-enable these tests after Requests regeneration. +# - data: +# notification: +# notificationType: RequestStatusChange +# linguisticRequest: +# status: Accepted +# requestReference: +# expectations: +# assertions: +# - count(violations) === 4 +# - violations.get(0).getMessage() === 'This value should not be blank.' +# - violations.get(0).getPropertyPath() === 'notification.linguisticRequest.requestReference.year' +# - violations.get(1).getMessage() === 'This value should not be blank.' +# - violations.get(1).getPropertyPath() === 'notification.linguisticRequest.requestReference.number' +# - violations.get(2).getMessage() === 'This value should not be blank.' +# - violations.get(2).getPropertyPath() === 'notification.linguisticRequest.requestReference.part' +# - violations.get(3).getMessage() === 'This value should not be blank.' +# - violations.get(3).getPropertyPath() === 'notification.linguisticRequest.requestReference.version' - data: notification: notificationType: RequestStatusChange @@ -104,17 +113,20 @@ tests: requestReference: expectations: assertions: - - count(violations) === 5 - - violations.get(0).getMessage() === 'This value should not be blank.' - - violations.get(0).getPropertyPath() === 'notification.product.productReference.requestReference.year' - - violations.get(1).getMessage() === 'This value should not be blank.' - - violations.get(1).getPropertyPath() === 'notification.product.productReference.requestReference.number' - - violations.get(2).getMessage() === 'This value should not be blank.' - - violations.get(2).getPropertyPath() === 'notification.product.productReference.requestReference.part' - - violations.get(3).getMessage() === 'This value should not be blank.' - - violations.get(3).getPropertyPath() === 'notification.product.productReference.requestReference.version' - - strpos(violations.get(4).getMessage(), 'Choose a valid product status') === 0 - - violations.get(4).getPropertyPath() === 'notification.product.status' + - strpos(violations.get(0).getMessage(), 'Choose a valid product status') === 0 + - violations.get(0).getPropertyPath() === 'notification.product.status' +# @todo re-enable these tests after Requests regeneration. +# - count(violations) === 5 +# - violations.get(0).getMessage() === 'This value should not be blank.' +# - violations.get(0).getPropertyPath() === 'notification.product.productReference.requestReference.year' +# - violations.get(1).getMessage() === 'This value should not be blank.' +# - violations.get(1).getPropertyPath() === 'notification.product.productReference.requestReference.number' +# - violations.get(2).getMessage() === 'This value should not be blank.' +# - violations.get(2).getPropertyPath() === 'notification.product.productReference.requestReference.part' +# - violations.get(3).getMessage() === 'This value should not be blank.' +# - violations.get(3).getPropertyPath() === 'notification.product.productReference.requestReference.version' +# - strpos(violations.get(4).getMessage(), 'Choose a valid product status') === 0 +# - violations.get(4).getPropertyPath() === 'notification.product.status' - data: notification: notificationType: ProductStatusChange From 8e9b7b8a5beec78298704b2be67fc072ea97f652 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 11:44:07 +0100 Subject: [PATCH 11/14] EWPP-4991: Regenerate authentication and remove useless test suites. --- .github/workflows/ci.yml | 4 ---- phpunit.xml.dist | 6 ------ .../ClientCertificateClassmap.php | 1 + .../ClientCertificateClient.php | 12 +++++++++--- .../ClientCertificate/Type/GetServiceTicket.php | 16 ++++++++++------ .../Type/GetServiceTicketResponse.php | 11 +++++++---- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba57bfa5..a10e92bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,6 @@ jobs: # run: docker-compose exec -T php ./vendor/bin/phpunit # While porting to 3.x run each test suite separately. # We will remove this one the job is done. - - name: Authentication - run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Authentication" - name: CodeGenerator run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite CodeGenerator" - name: ExtSoapEngine @@ -39,8 +37,6 @@ jobs: run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Notification" - name: Request run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Request" - - name: TicketValidation - run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite TicketValidation" - name: RequestClientFactoryTest run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite RequestClientFactoryTest" - name: SerializerTest diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8bb1a76b..bce6bc5f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,9 +6,6 @@ - - tests/Authentication - tests/CodeGenerator @@ -21,9 +18,6 @@ tests/Request - - tests/TicketValidation - tests/RequestClientFactoryTest.php diff --git a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php index 3a6a3bdf..f3c966f7 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClassmap.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClassmap.php @@ -16,3 +16,4 @@ public static function getCollection() : \Soap\ExtSoapEngine\Configuration\Class ); } } + diff --git a/src/Authentication/ClientCertificate/ClientCertificateClient.php b/src/Authentication/ClientCertificate/ClientCertificateClient.php index c7155823..57091ed6 100644 --- a/src/Authentication/ClientCertificate/ClientCertificateClient.php +++ b/src/Authentication/ClientCertificate/ClientCertificateClient.php @@ -21,12 +21,18 @@ public function __construct(\Phpro\SoapClient\Caller\Caller $caller) } /** - * @param RequestInterface|Type\GetServiceTicket $getServiceTicketPart - * @return ResultInterface|Type\GetServiceTicketResponse + * @param RequestInterface & Type\GetServiceTicket $getServiceTicketPart + * @return ResultInterface & Type\GetServiceTicketResponse * @throws SoapException */ public function getServiceTicket(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicket $getServiceTicketPart) : \OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse { - return ($this->caller)('getServiceTicket', $getServiceTicketPart); + $response = ($this->caller)('getServiceTicket', $getServiceTicketPart); + + \Psl\Type\instance_of(\OpenEuropa\EPoetry\Authentication\ClientCertificate\Type\GetServiceTicketResponse::class)->assert($response); + \Psl\Type\instance_of(\Phpro\SoapClient\Type\ResultInterface::class)->assert($response); + + return $response; } } + diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php index 3d727ddd..3e67a8a3 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicket.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicket.php @@ -7,16 +7,19 @@ class GetServiceTicket implements RequestInterface { /** + * The target service for which you want to obtain a service ticket. + * This must be a valid URL. + * * @var string */ - private $service; + private string $service; /** * Constructor * - * @var string $service + * @param string $service */ - public function __construct($service) + public function __construct(string $service) { $this->service = $service; } @@ -24,16 +27,16 @@ public function __construct($service) /** * @return string */ - public function getService() + public function getService() : string { return $this->service; } /** * @param string $service - * @return GetServiceTicket + * @return static */ - public function withService($service) + public function withService(string $service) : static { $new = clone $this; $new->service = $service; @@ -41,3 +44,4 @@ public function withService($service) return $new; } } + diff --git a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php index e711cc34..f47cbab7 100644 --- a/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php +++ b/src/Authentication/ClientCertificate/Type/GetServiceTicketResponse.php @@ -7,23 +7,25 @@ class GetServiceTicketResponse implements ResultInterface { /** + * Service ticket for the specified service. + * * @var string */ - private $serviceTicket; + private string $serviceTicket; /** * @return string */ - public function getServiceTicket() + public function getServiceTicket() : string { return $this->serviceTicket; } /** * @param string $serviceTicket - * @return GetServiceTicketResponse + * @return static */ - public function withServiceTicket($serviceTicket) + public function withServiceTicket(string $serviceTicket) : static { $new = clone $this; $new->serviceTicket = $serviceTicket; @@ -31,3 +33,4 @@ public function withServiceTicket($serviceTicket) return $new; } } + From c503465bc2d011983afe5a890d2201409e596517 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 12:06:13 +0100 Subject: [PATCH 12/14] EWPP-4991: Add fluent adder and interface assembler. --- src/CodeGenerator/ConfigProcessor.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 93d786cf..33f0af94 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -45,7 +45,25 @@ public static function addRules(Config $config, array $specialClassesAndProperti ->withBoolGetters() ) ), + new Rules\AssembleRule( + new OpenEuropa\Assembler\FluentAdderAssembler( + (new OpenEuropa\Assembler\FluentAdderAssemblerOptions()) + ->whitelist($specialClassesAndProperties) + ) + ), new Rules\AssembleRule(new OpenEuropa\Assembler\HasPropertyAssembler()), + // Add "implements RequestInterface" to request classes. + new Rules\IsRequestRule($config->getEngine()->getMetadata(), + new Rules\MultiRule([ + new Rules\AssembleRule(new Assembler\RequestAssembler()), + ]) + ), + // Add "implements ResultInterface" to result classes. + new Rules\IsResultRule($config->getEngine()->getMetadata(), + new Rules\MultiRule([ + new Rules\AssembleRule(new Assembler\ResultAssembler()), + ]) + ), new Rules\AssembleRule(new Assembler\ClassMapAssembler()), new Rules\AssembleRule(new Assembler\ClientConstructorAssembler()), new Rules\AssembleRule(new Assembler\ClientMethodAssembler()), From 00fe41227df38fa6a19352be1fd827e6c1993977 Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 12:18:21 +0100 Subject: [PATCH 13/14] EWPP-4991: Do not reuse configuration for notification. --- config/soap-client-notification.php | 31 ++++++++++++++----- .../Assembler/FluentAdderAssembler.php | 3 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/config/soap-client-notification.php b/config/soap-client-notification.php index 6485791a..1ea04b3c 100644 --- a/config/soap-client-notification.php +++ b/config/soap-client-notification.php @@ -1,14 +1,13 @@ setEngine($engine) ->setTypeDestination('src/Notification/Type') ->setTypeNamespace('OpenEuropa\EPoetry\Notification\Type') @@ -17,7 +16,25 @@ ->setClassMapDestination('src/Notification/') ->setClassMapName('NotificationClassmap') ->setClassMapNamespace('OpenEuropa\EPoetry\Notification') -; - -ConfigProcessor::addRules($config); -return $config; + ->setRuleSet(new Rules\RuleSet([ + new Rules\AssembleRule(new Assembler\PropertyAssembler( + Assembler\PropertyAssemblerOptions::create() + ->withTypeHints(false) + ) + ), + new Rules\AssembleRule(new Assembler\FluentSetterAssembler( + Assembler\FluentSetterAssemblerOptions::create() + ->withTypeHints() + ) + ), + new Rules\AssembleRule(new Assembler\GetterAssembler( + Assembler\GetterAssemblerOptions::create() + ->withReturnType() + ->withBoolGetters() + ) + ), + new Rules\AssembleRule(new OpenEuropa\Assembler\HasPropertyAssembler()), + new Rules\AssembleRule(new Assembler\ClassMapAssembler()), + new Rules\AssembleRule(new Assembler\ClientConstructorAssembler()), + new Rules\AssembleRule(new Assembler\ClientMethodAssembler()), + ])); diff --git a/src/CodeGenerator/Assembler/FluentAdderAssembler.php b/src/CodeGenerator/Assembler/FluentAdderAssembler.php index 28c233e4..a65836b9 100644 --- a/src/CodeGenerator/Assembler/FluentAdderAssembler.php +++ b/src/CodeGenerator/Assembler/FluentAdderAssembler.php @@ -4,7 +4,6 @@ namespace OpenEuropa\EPoetry\CodeGenerator\Assembler; -use Phpro\SoapClient\CodeGenerator\Assembler\FluentSetterAssemblerOptions; use Phpro\SoapClient\CodeGenerator\Context\ContextInterface; use Phpro\SoapClient\CodeGenerator\Util\Normalizer; use Laminas\Code\Generator\DocBlockGenerator; @@ -26,7 +25,7 @@ class FluentAdderAssembler extends AbstractAssembler */ public function __construct(FluentAdderAssemblerOptions $options = null) { - $this->options = $options ?? new FluentSetterAssemblerOptions(); + $this->options = $options ?? new FluentAdderAssemblerOptions(); } /** From 34360087ed4cdda2fc041040c39990ba5876ca9a Mon Sep 17 00:00:00 2001 From: Antonio De Marco Date: Thu, 23 Jan 2025 14:47:38 +0100 Subject: [PATCH 14/14] EWPP-4991: Restore 2.x config processor. --- src/CodeGenerator/ConfigProcessor.php | 103 ++++++++------------------ 1 file changed, 29 insertions(+), 74 deletions(-) diff --git a/src/CodeGenerator/ConfigProcessor.php b/src/CodeGenerator/ConfigProcessor.php index 33f0af94..cdcd5224 100644 --- a/src/CodeGenerator/ConfigProcessor.php +++ b/src/CodeGenerator/ConfigProcessor.php @@ -24,63 +24,16 @@ class ConfigProcessor * @param array $overridePropertyTypes * Override specific property types when generating classes. * - * @return void + * @return \Phpro\SoapClient\CodeGenerator\Config\Config + * Configuration object instance. */ - public static function addRules(Config $config, array $specialClassesAndProperties = [], array $overridePropertyTypes = []) + public static function addRules(Config $config, array $specialClassesAndProperties = [], array $overridePropertyTypes = []): Config { - $rules = [ - new Rules\AssembleRule(new Assembler\PropertyAssembler( - Assembler\PropertyAssemblerOptions::create() - ->withTypeHints(false) - ) - ), - new Rules\AssembleRule(new Assembler\FluentSetterAssembler( - Assembler\FluentSetterAssemblerOptions::create() - ->withTypeHints() - ) - ), - new Rules\AssembleRule(new Assembler\GetterAssembler( - Assembler\GetterAssemblerOptions::create() - ->withReturnType() - ->withBoolGetters() - ) - ), - new Rules\AssembleRule( - new OpenEuropa\Assembler\FluentAdderAssembler( - (new OpenEuropa\Assembler\FluentAdderAssemblerOptions()) - ->whitelist($specialClassesAndProperties) - ) - ), - new Rules\AssembleRule(new OpenEuropa\Assembler\HasPropertyAssembler()), - // Add "implements RequestInterface" to request classes. - new Rules\IsRequestRule($config->getEngine()->getMetadata(), - new Rules\MultiRule([ - new Rules\AssembleRule(new Assembler\RequestAssembler()), - ]) - ), - // Add "implements ResultInterface" to result classes. - new Rules\IsResultRule($config->getEngine()->getMetadata(), - new Rules\MultiRule([ - new Rules\AssembleRule(new Assembler\ResultAssembler()), - ]) - ), - new Rules\AssembleRule(new Assembler\ClassMapAssembler()), - new Rules\AssembleRule(new Assembler\ClientConstructorAssembler()), - new Rules\AssembleRule(new Assembler\ClientMethodAssembler()), - ]; - - $config->setRuleSet(new Rules\RuleSet($rules)); - - return; - // Set all property visibility to "protected". // We have to do this as the SOAP handler will erroneously create duplicate // public properties when a value object extends another one with those // same properties marked as "private". - $defaultPropertyAssemblerOptions = (new Assembler\PropertyAssemblerOptions()) - ->withVisibility(PropertyGenerator::VISIBILITY_PRIVATE) - ->withTypeHints(false); - $defaultPropertyAssembler = new Assembler\PropertyAssembler($defaultPropertyAssemblerOptions); + $defaultPropertyAssembler = new Assembler\PropertyAssembler(PropertyGenerator::VISIBILITY_PROTECTED); $arrayPropertyAssembler = new OpenEuropa\Assembler\ArrayPropertyAssembler( (new OpenEuropa\Assembler\ArrayPropertyAssemblerOptions()) @@ -104,9 +57,10 @@ public static function addRules(Config $config, array $specialClassesAndProperti ); $defaultGetterAssembler = new Assembler\GetterAssembler( - Assembler\GetterAssemblerOptions::create() + (new Assembler\GetterAssemblerOptions()) ->withReturnType() ->withBoolGetters() + ->withReturnNull() ); $arrayGetterAssembler = new OpenEuropa\Assembler\ArrayGetterAssembler( @@ -121,38 +75,38 @@ public static function addRules(Config $config, array $specialClassesAndProperti $hasPropertyAssembler = new OpenEuropa\Assembler\HasPropertyAssembler(); - $config - // // Add the ResultInterface to classes that match given regex. - // ->addRule( - // new Rules\TypenameMatchesRule( - // new Rules\AssembleRule(new Assembler\ResultAssembler()), - // '/Response$/' - // ) - // ) - // Set the default property assembler and generate all properties. + return $config + // // Add the ResultInterface to classes that match given regex. + // ->addRule( + // new Rules\TypenameMatchesRule( + // new Rules\AssembleRule(new Assembler\ResultAssembler()), + // '/Response$/' + // ) + // ) + // Set the default property assembler and generate all properties. ->addRule(new Rules\AssembleRule($defaultPropertyAssembler)) - // Update properties and set them as 'nullable' -// ->addRule(new Rules\AssembleRule($arrayPropertyAssembler)) - // Update properties and update only some of them. + // Update properties and set them as 'nullable' + ->addRule(new Rules\AssembleRule($arrayPropertyAssembler)) + // Update properties and update only some of them. ->addRule(new Rules\AssembleRule($defaultSetterAssembler)) - // Update setters and update only some of them. + // Update setters and update only some of them. ->addRule(new Rules\AssembleRule($arraySetterAssembler)) - // Set the default getter assembler and generate all getters methods. + // Set the default getter assembler and generate all getters methods. ->addRule(new Rules\AssembleRule($defaultGetterAssembler)) - // Update getters and update only some of them. + // Update getters and update only some of them. ->addRule(new Rules\AssembleRule($arrayGetterAssembler)) - // Add adders only on some classes only. + // Add adders only on some classes only. ->addRule(new Rules\AssembleRule($fluentAdderAssembler)) - // Override property and method types. + // Override property and method types. ->addRule(new Rules\AssembleRule( new OpenEuropa\Assembler\OverridePropertyTypeAssembler( (new OpenEuropa\Assembler\OverridePropertyTypeAssemblerOptions()) ->setPropertyTypeMapping($overridePropertyTypes) ) )) - // // Set the default setter assembler and generate all setters methods. - // ->addRule(new Rules\AssembleRule($nullablePropertyAssembler)) - // Add has[Properties] only on some classes only. + // // Set the default setter assembler and generate all setters methods. + // ->addRule(new Rules\AssembleRule($nullablePropertyAssembler)) + // Add has[Properties] only on some classes only. ->addRule(new Rules\AssembleRule($hasPropertyAssembler)) ->addRule( new Rules\IsRequestRule( @@ -185,11 +139,12 @@ public static function addRules(Config $config, array $specialClassesAndProperti * @param array $classes * Array of class names, without their namespace. * - * @return void + * @return \Phpro\SoapClient\CodeGenerator\Config\Config + * Configuration object. */ public static function addConstructorRule(Config $config, array $classes) { - $config + return $config ->addRule(new Rules\TypenameMatchesRule( new Rules\AssembleRule( new Assembler\ConstructorAssembler(