diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 493b97fde..7bec230ba 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -52,7 +52,7 @@ jobs: uses: shivammathur/setup-php@v2 with: # Should be the higest supported version, so we can use the newest tools - php-version: '8.3' + php-version: '8.4' tools: composer, composer-require-checker, composer-unused, phpcs extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, soap, spl, xml coverage: none @@ -145,7 +145,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Setup PHP, with composer and extensions @@ -185,15 +185,15 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Run unit tests with coverage - if: ${{ matrix.php-versions == '8.3' }} + if: ${{ matrix.php-versions == '8.4' }} run: vendor/bin/phpunit - name: Run unit tests (no coverage) - if: ${{ matrix.php-versions != '8.3' }} + if: ${{ matrix.php-versions != '8.4' }} run: vendor/bin/phpunit --no-coverage - name: Save coverage data - if: ${{ matrix.php-versions == '8.3' }} + if: ${{ matrix.php-versions == '8.4' }} uses: actions/upload-artifact@v4 with: name: coverage-data @@ -207,7 +207,7 @@ jobs: fail-fast: true matrix: operating-system: [windows-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Setup PHP, with composer and extensions diff --git a/src/Binding.php b/src/Binding.php index 063b137aa..e4ca793d7 100644 --- a/src/Binding.php +++ b/src/Binding.php @@ -161,7 +161,7 @@ public function getDestination(): ?string * * @param string|null $relayState The RelayState. */ - public function setRelayState(string $relayState = null): void + public function setRelayState(?string $relayState = null): void { $this->relayState = $relayState; } @@ -185,7 +185,7 @@ public function getRelayState(): ?string * * @param string|null $destination The destination the message should be delivered to. */ - public function setDestination(string $destination = null): void + public function setDestination(?string $destination = null): void { $this->destination = $destination; } diff --git a/src/Certificate/KeyLoader.php b/src/Certificate/KeyLoader.php index a2d14faa6..444e33b64 100644 --- a/src/Certificate/KeyLoader.php +++ b/src/Certificate/KeyLoader.php @@ -46,7 +46,7 @@ public function __construct() */ public static function extractPublicKeys( CertificateProvider $config, - string $usage = null, + ?string $usage = null, bool $required = false, ): KeyCollection { $keyLoader = new self(); @@ -63,7 +63,7 @@ public static function extractPublicKeys( */ public function loadKeysFromConfiguration( CertificateProvider $config, - string $usage = null, + ?string $usage = null, bool $required = false, ): KeyCollection { $keys = $config->getKeys(); @@ -96,7 +96,7 @@ public function loadKeysFromConfiguration( * @param array|\Traversable $configuredKeys * @param string|null $usage */ - public function loadKeys($configuredKeys, string $usage = null): void + public function loadKeys($configuredKeys, ?string $usage = null): void { foreach ($configuredKeys as $keyData) { if (isset($keyData['X509Certificate'])) { diff --git a/src/Certificate/PrivateKey.php b/src/Certificate/PrivateKey.php index 2ced7f246..d775bf184 100644 --- a/src/Certificate/PrivateKey.php +++ b/src/Certificate/PrivateKey.php @@ -12,7 +12,7 @@ class PrivateKey extends Key * @throws \SimpleSAML\SAML2\Exception\InvalidArgumentException * @return \SimpleSAML\SAML2\Certificate\PrivateKey */ - public static function create(string $keyContents, string $passphrase = null): PrivateKey + public static function create(string $keyContents, ?string $passphrase = null): PrivateKey { $keyData = ['PEM' => $keyContents, self::USAGE_ENCRYPTION => true]; if ($passphrase) { diff --git a/src/Compat/AbstractContainer.php b/src/Compat/AbstractContainer.php index 1fe05de2b..af45888e1 100644 --- a/src/Compat/AbstractContainer.php +++ b/src/Compat/AbstractContainer.php @@ -177,7 +177,7 @@ abstract public function getTempDir(): string; * @param string $data The data we should write to the file. * @param int|null $mode The permissions to apply to the file. Defaults to 0600. */ - abstract public function writeFile(string $filename, string $data, int $mode = null): void; + abstract public function writeFile(string $filename, string $data, ?int $mode = null): void; /** diff --git a/src/Compat/MockContainer.php b/src/Compat/MockContainer.php index b60018a54..4806f811d 100644 --- a/src/Compat/MockContainer.php +++ b/src/Compat/MockContainer.php @@ -61,7 +61,7 @@ public function debugMessage($message, string $type): void * @return string */ public function getPOSTRedirectURL( - /** @scrutinizer ignore-unused */string $url = null, + /** @scrutinizer ignore-unused */?string $url = null, /** @scrutinizer ignore-unused */array $data = [], ): string { return strval($url); @@ -82,7 +82,7 @@ public function getTempDir(): string * @param string $data * @param int|null $mode */ - public function writeFile(string $filename, string $data, int $mode = null): void + public function writeFile(string $filename, string $data, ?int $mode = null): void { if ($mode === null) { $mode = 0600; diff --git a/src/Configuration/DecryptionProvider.php b/src/Configuration/DecryptionProvider.php index 5dd517dcb..8f580023c 100644 --- a/src/Configuration/DecryptionProvider.php +++ b/src/Configuration/DecryptionProvider.php @@ -24,7 +24,7 @@ public function getSharedKey(): ?string; * * @return mixed */ - public function getPrivateKey(string $name, bool $required = null); + public function getPrivateKey(string $name, ?bool $required = null); diff --git a/src/Configuration/IdentityProvider.php b/src/Configuration/IdentityProvider.php index 03f9ac50e..646f9f23f 100644 --- a/src/Configuration/IdentityProvider.php +++ b/src/Configuration/IdentityProvider.php @@ -74,7 +74,7 @@ public function getSharedKey(): ?string * @param bool $required * @return mixed|null */ - public function getPrivateKey(string $name, bool $required = null) + public function getPrivateKey(string $name, ?bool $required = null) { if ($required === null) { $required = false; diff --git a/src/Configuration/ServiceProvider.php b/src/Configuration/ServiceProvider.php index d2e92a2c6..352562e22 100644 --- a/src/Configuration/ServiceProvider.php +++ b/src/Configuration/ServiceProvider.php @@ -85,7 +85,7 @@ public function getSharedKey(): ?string * @param bool $required * @return mixed|null */ - public function getPrivateKey(string $name, bool $required = null) + public function getPrivateKey(string $name, ?bool $required = null) { if ($required === null) { $required = false; diff --git a/src/Exception/ProtocolViolationException.php b/src/Exception/ProtocolViolationException.php index 99eb73d37..0b29fd4d2 100644 --- a/src/Exception/ProtocolViolationException.php +++ b/src/Exception/ProtocolViolationException.php @@ -12,9 +12,9 @@ class ProtocolViolationException extends RuntimeException { /** - * @param string $message + * @param string|null $message */ - public function __construct(string $message = null) + public function __construct(?string $message = null) { if ($message === null) { if (defined('static::DEFAULT_MESSAGE')) { diff --git a/src/SOAPClient.php b/src/SOAPClient.php index 6bea71169..96fc762c8 100644 --- a/src/SOAPClient.php +++ b/src/SOAPClient.php @@ -50,7 +50,7 @@ class SOAPClient public function send( AbstractMessage $msg, Configuration $srcMetadata, - Configuration $dstMetadata = null, + ?Configuration $dstMetadata = null, ): AbstractMessage { $issuer = $msg->getIssuer(); diff --git a/src/XML/EncryptedElementTrait.php b/src/XML/EncryptedElementTrait.php index d773dd600..4b582b9d2 100644 --- a/src/XML/EncryptedElementTrait.php +++ b/src/XML/EncryptedElementTrait.php @@ -114,7 +114,7 @@ public static function fromXML(DOMElement $xml): static /** * @inheritDoc */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $this->encryptedData->toXML($e); diff --git a/src/XML/ExtensionsTrait.php b/src/XML/ExtensionsTrait.php index 6d3400c53..d4f5468c0 100644 --- a/src/XML/ExtensionsTrait.php +++ b/src/XML/ExtensionsTrait.php @@ -92,7 +92,7 @@ public function isEmptyElement(): bool * @param \DOMElement|null $parent The element we should add this Extensions element to. * @return \DOMElement The new md:Extensions XML element. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/alg/DigestMethod.php b/src/XML/alg/DigestMethod.php index b83519c29..f6d62ca75 100644 --- a/src/XML/alg/DigestMethod.php +++ b/src/XML/alg/DigestMethod.php @@ -80,7 +80,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('Algorithm', $this->getAlgorithm()); diff --git a/src/XML/alg/SigningMethod.php b/src/XML/alg/SigningMethod.php index 410fafd7e..3aa270ef0 100644 --- a/src/XML/alg/SigningMethod.php +++ b/src/XML/alg/SigningMethod.php @@ -113,7 +113,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/ecp/RelayState.php b/src/XML/ecp/RelayState.php index e3c38a208..141a1c4b6 100644 --- a/src/XML/ecp/RelayState.php +++ b/src/XML/ecp/RelayState.php @@ -87,7 +87,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this element to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS(C::NS_SOAP_ENV_11, 'env:mustUnderstand', '1'); diff --git a/src/XML/ecp/Request.php b/src/XML/ecp/Request.php index 1fe1270c5..a37b8abfb 100644 --- a/src/XML/ecp/Request.php +++ b/src/XML/ecp/Request.php @@ -152,7 +152,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this element to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS(C::NS_SOAP_ENV_11, 'env:mustUnderstand', '1'); diff --git a/src/XML/ecp/RequestAuthenticated.php b/src/XML/ecp/RequestAuthenticated.php index 735dd2b3e..60b1d155b 100644 --- a/src/XML/ecp/RequestAuthenticated.php +++ b/src/XML/ecp/RequestAuthenticated.php @@ -98,7 +98,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this element to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/ecp/Response.php b/src/XML/ecp/Response.php index 7c7a1f455..782c29e20 100644 --- a/src/XML/ecp/Response.php +++ b/src/XML/ecp/Response.php @@ -101,7 +101,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this element to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $response = $this->instantiateParentElement($parent); diff --git a/src/XML/ecp/SubjectConfirmation.php b/src/XML/ecp/SubjectConfirmation.php index a83bf646c..b8578d843 100644 --- a/src/XML/ecp/SubjectConfirmation.php +++ b/src/XML/ecp/SubjectConfirmation.php @@ -122,7 +122,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this element to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS(C::NS_SOAP_ENV_11, 'env:mustUnderstand', '1'); diff --git a/src/XML/emd/RepublishRequest.php b/src/XML/emd/RepublishRequest.php index 2d354550a..379b781b5 100644 --- a/src/XML/emd/RepublishRequest.php +++ b/src/XML/emd/RepublishRequest.php @@ -74,7 +74,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/md/AbstractEndpointType.php b/src/XML/md/AbstractEndpointType.php index d02b9868a..0bb22e6d8 100644 --- a/src/XML/md/AbstractEndpointType.php +++ b/src/XML/md/AbstractEndpointType.php @@ -147,7 +147,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we should append this endpoint to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/md/AbstractIndexedEndpointType.php b/src/XML/md/AbstractIndexedEndpointType.php index c3795048e..6a66a6ada 100644 --- a/src/XML/md/AbstractIndexedEndpointType.php +++ b/src/XML/md/AbstractIndexedEndpointType.php @@ -99,7 +99,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we should append this endpoint to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/md/AbstractLocalizedName.php b/src/XML/md/AbstractLocalizedName.php index e208ac5c2..273e5051f 100644 --- a/src/XML/md/AbstractLocalizedName.php +++ b/src/XML/md/AbstractLocalizedName.php @@ -92,7 +92,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent * @return \DOMElement */ - final public function toXML(DOMElement $parent = null): DOMElement + final public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS(C::NS_XML, 'xml:lang', $this->getLanguage()); diff --git a/src/XML/md/AbstractMetadataDocument.php b/src/XML/md/AbstractMetadataDocument.php index 58d7cf262..29f8dfc5e 100644 --- a/src/XML/md/AbstractMetadataDocument.php +++ b/src/XML/md/AbstractMetadataDocument.php @@ -90,7 +90,7 @@ protected function getOriginalXML(): DOMElement * * @return \DOMElement */ - public function toUnsignedXML(DOMElement $parent = null): DOMElement + public function toUnsignedXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/md/AbstractSSODescriptor.php b/src/XML/md/AbstractSSODescriptor.php index 8b7382b66..19196fdfb 100644 --- a/src/XML/md/AbstractSSODescriptor.php +++ b/src/XML/md/AbstractSSODescriptor.php @@ -141,7 +141,7 @@ public function getNameIDFormat(): array * @param \DOMElement|null $parent The EntityDescriptor we should append this SSODescriptorType to. * @return \DOMElement The generated SSODescriptor DOMElement. */ - public function toUnsignedXML(DOMElement $parent = null): DOMElement + public function toUnsignedXML(?DOMElement $parent = null): DOMElement { $e = parent::toUnsignedXML($parent); diff --git a/src/XML/md/AbstractSignedMdElement.php b/src/XML/md/AbstractSignedMdElement.php index af3f85ee7..378877d11 100644 --- a/src/XML/md/AbstractSignedMdElement.php +++ b/src/XML/md/AbstractSignedMdElement.php @@ -61,7 +61,7 @@ protected function setXML(DOMElement $xml): void * @return \DOMElement * @throws \Exception */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { if ($this->isSigned() === true && $this->signer === null) { // We already have a signed document and no signer was set to re-sign it @@ -100,5 +100,5 @@ public function toXML(DOMElement $parent = null): DOMElement * @param \DOMElement|null $parent * @return \DOMElement */ - abstract public function toUnsignedXML(DOMElement $parent = null): DOMElement; + abstract public function toUnsignedXML(?DOMElement $parent = null): DOMElement; } diff --git a/src/XML/md/AdditionalMetadataLocation.php b/src/XML/md/AdditionalMetadataLocation.php index 968b7ed7a..af36afabd 100644 --- a/src/XML/md/AdditionalMetadataLocation.php +++ b/src/XML/md/AdditionalMetadataLocation.php @@ -90,7 +90,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement This AdditionalMetadataLocation-element. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent(); diff --git a/src/XML/md/AttributeConsumingService.php b/src/XML/md/AttributeConsumingService.php index 2cf5ea8d4..a722f759a 100644 --- a/src/XML/md/AttributeConsumingService.php +++ b/src/XML/md/AttributeConsumingService.php @@ -151,7 +151,7 @@ public function getRequestedAttribute(): array * @param \DOMElement $parent The element we should append this AttributeConsumingService to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('index', strval($this->getIndex())); diff --git a/src/XML/md/AuthnAuthorityDescriptor.php b/src/XML/md/AuthnAuthorityDescriptor.php index fdc697599..8f7ee3513 100644 --- a/src/XML/md/AuthnAuthorityDescriptor.php +++ b/src/XML/md/AuthnAuthorityDescriptor.php @@ -44,7 +44,7 @@ public function __construct( array $protocolSupportEnumeration, protected array $assertionIDRequestService = [], protected array $nameIDFormat = [], - string $ID = null, + ?string $ID = null, ?DateTimeImmutable $validUntil = null, ?string $cacheDuration = null, ?Extensions $extensions = null, diff --git a/src/XML/md/ContactPerson.php b/src/XML/md/ContactPerson.php index 4e2d1197d..67e940ae3 100644 --- a/src/XML/md/ContactPerson.php +++ b/src/XML/md/ContactPerson.php @@ -203,7 +203,7 @@ public static function fromXML(DOMElement $xml): static * * @return \DOMElement The new ContactPerson-element. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/md/EntityDescriptor.php b/src/XML/md/EntityDescriptor.php index 1c8a107f4..9224e4c3e 100644 --- a/src/XML/md/EntityDescriptor.php +++ b/src/XML/md/EntityDescriptor.php @@ -55,7 +55,7 @@ public function __construct( ?string $id = null, ?DateTimeImmutable $validUntil = null, ?string $cacheDuration = null, - Extensions $extensions = null, + ?Extensions $extensions = null, protected array $roleDescriptor = [], protected ?AffiliationDescriptor $affiliationDescriptor = null, protected ?Organization $organization = null, diff --git a/src/XML/md/KeyDescriptor.php b/src/XML/md/KeyDescriptor.php index e102c3df8..9e665c6bb 100644 --- a/src/XML/md/KeyDescriptor.php +++ b/src/XML/md/KeyDescriptor.php @@ -120,7 +120,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this KeyDescriptor to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/md/Organization.php b/src/XML/md/Organization.php index 9cf41ab9c..6e3f96c4c 100644 --- a/src/XML/md/Organization.php +++ b/src/XML/md/Organization.php @@ -159,7 +159,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should add this organization to. * @return \DOMElement This Organization-element. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/md/RequestedAttribute.php b/src/XML/md/RequestedAttribute.php index 3b86eb7e2..38ffe3d6b 100644 --- a/src/XML/md/RequestedAttribute.php +++ b/src/XML/md/RequestedAttribute.php @@ -90,7 +90,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this RequestedAttribute to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::toXML($parent); diff --git a/src/XML/md/UnknownRoleDescriptor.php b/src/XML/md/UnknownRoleDescriptor.php index 441def5a0..ce55c7b6e 100644 --- a/src/XML/md/UnknownRoleDescriptor.php +++ b/src/XML/md/UnknownRoleDescriptor.php @@ -81,7 +81,7 @@ public function getRawRoleDescriptor(): Chunk * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this unknown RoleDescriptor. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { return $this->getRawRoleDescriptor()->toXML($parent); } diff --git a/src/XML/mdattr/EntityAttributes.php b/src/XML/mdattr/EntityAttributes.php index d8993757d..66e3523a8 100644 --- a/src/XML/mdattr/EntityAttributes.php +++ b/src/XML/mdattr/EntityAttributes.php @@ -162,7 +162,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/mdrpi/Publication.php b/src/XML/mdrpi/Publication.php index ef4d86460..daa7b8564 100644 --- a/src/XML/mdrpi/Publication.php +++ b/src/XML/mdrpi/Publication.php @@ -113,7 +113,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('publisher', $this->getPublisher()); diff --git a/src/XML/mdrpi/PublicationInfo.php b/src/XML/mdrpi/PublicationInfo.php index a1b62b731..a33d06a1a 100644 --- a/src/XML/mdrpi/PublicationInfo.php +++ b/src/XML/mdrpi/PublicationInfo.php @@ -148,7 +148,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('publisher', $this->getPublisher()); diff --git a/src/XML/mdrpi/PublicationPath.php b/src/XML/mdrpi/PublicationPath.php index b032c3c81..d959f88f6 100644 --- a/src/XML/mdrpi/PublicationPath.php +++ b/src/XML/mdrpi/PublicationPath.php @@ -82,7 +82,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/mdrpi/RegistrationInfo.php b/src/XML/mdrpi/RegistrationInfo.php index 03b5089f3..54e3f7dd9 100644 --- a/src/XML/mdrpi/RegistrationInfo.php +++ b/src/XML/mdrpi/RegistrationInfo.php @@ -131,7 +131,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('registrationAuthority', $this->getRegistrationAuthority()); diff --git a/src/XML/mdui/DiscoHints.php b/src/XML/mdui/DiscoHints.php index 3014f7a75..15bed14b8 100644 --- a/src/XML/mdui/DiscoHints.php +++ b/src/XML/mdui/DiscoHints.php @@ -152,7 +152,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/mdui/Keywords.php b/src/XML/mdui/Keywords.php index a8cf1112f..070cea32a 100644 --- a/src/XML/mdui/Keywords.php +++ b/src/XML/mdui/Keywords.php @@ -106,7 +106,7 @@ public static function fromXML(DOMElement $xml): static * @throws \Exception * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { /** @psalm-var \DOMDocument $e->ownerDocument */ $e = $this->instantiateParentElement($parent); diff --git a/src/XML/mdui/Logo.php b/src/XML/mdui/Logo.php index c82356487..0052584d5 100644 --- a/src/XML/mdui/Logo.php +++ b/src/XML/mdui/Logo.php @@ -129,7 +129,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Logo to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent(); diff --git a/src/XML/mdui/UIInfo.php b/src/XML/mdui/UIInfo.php index e2b0a321a..bbb858e1f 100644 --- a/src/XML/mdui/UIInfo.php +++ b/src/XML/mdui/UIInfo.php @@ -302,7 +302,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AbstractBaseID.php b/src/XML/saml/AbstractBaseID.php index 1a429bb51..4cb0d0fe7 100644 --- a/src/XML/saml/AbstractBaseID.php +++ b/src/XML/saml/AbstractBaseID.php @@ -122,7 +122,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this BaseID. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::toXML($parent); $e->setAttributeNS( diff --git a/src/XML/saml/AbstractBaseIDType.php b/src/XML/saml/AbstractBaseIDType.php index 0484743c3..6e0536c68 100644 --- a/src/XML/saml/AbstractBaseIDType.php +++ b/src/XML/saml/AbstractBaseIDType.php @@ -42,7 +42,7 @@ protected function __construct( * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this BaseID. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AbstractCondition.php b/src/XML/saml/AbstractCondition.php index 8a4af9c96..780ca6b2e 100644 --- a/src/XML/saml/AbstractCondition.php +++ b/src/XML/saml/AbstractCondition.php @@ -106,7 +106,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS( diff --git a/src/XML/saml/AbstractStatement.php b/src/XML/saml/AbstractStatement.php index 4139fe180..3a47cd395 100644 --- a/src/XML/saml/AbstractStatement.php +++ b/src/XML/saml/AbstractStatement.php @@ -106,7 +106,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Statement. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttributeNS( diff --git a/src/XML/saml/Action.php b/src/XML/saml/Action.php index 71b348dec..08f66e0d0 100644 --- a/src/XML/saml/Action.php +++ b/src/XML/saml/Action.php @@ -74,7 +74,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Action to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/Advice.php b/src/XML/saml/Advice.php index 13afc08dd..b90c248c8 100644 --- a/src/XML/saml/Advice.php +++ b/src/XML/saml/Advice.php @@ -143,7 +143,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/Assertion.php b/src/XML/saml/Assertion.php index f3230e26d..5e43e9713 100644 --- a/src/XML/saml/Assertion.php +++ b/src/XML/saml/Assertion.php @@ -341,7 +341,7 @@ protected function toUnsignedXML(?DOMElement $parent = null): DOMElement * @return \DOMElement This assertion. * @throws \Exception */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { if ($this->isSigned() === true && $this->signer === null) { // We already have a signed document and no signer was set to re-sign it diff --git a/src/XML/saml/AssertionIDRef.php b/src/XML/saml/AssertionIDRef.php index 1581e6fd9..5cd40e481 100644 --- a/src/XML/saml/AssertionIDRef.php +++ b/src/XML/saml/AssertionIDRef.php @@ -66,7 +66,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this AssertionIDRef. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $element = $this->instantiateParentElement($parent); $element->textContent = $this->getContent(); diff --git a/src/XML/saml/AssertionURIRef.php b/src/XML/saml/AssertionURIRef.php index dca187c22..557595fd6 100644 --- a/src/XML/saml/AssertionURIRef.php +++ b/src/XML/saml/AssertionURIRef.php @@ -66,7 +66,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $element = $this->instantiateParentElement($parent); $element->textContent = $this->getContent(); diff --git a/src/XML/saml/Attribute.php b/src/XML/saml/Attribute.php index 697e72717..52dc79ab1 100644 --- a/src/XML/saml/Attribute.php +++ b/src/XML/saml/Attribute.php @@ -151,7 +151,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Attribute to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('Name', $this->getName()); diff --git a/src/XML/saml/AttributeStatement.php b/src/XML/saml/AttributeStatement.php index 05553bb5a..74b26fa7a 100644 --- a/src/XML/saml/AttributeStatement.php +++ b/src/XML/saml/AttributeStatement.php @@ -86,7 +86,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Attribute to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AttributeValue.php b/src/XML/saml/AttributeValue.php index 0b136f7d7..069bc7f01 100644 --- a/src/XML/saml/AttributeValue.php +++ b/src/XML/saml/AttributeValue.php @@ -156,7 +156,7 @@ public static function fromXML(DOMElement $xml): static * * @return \DOMElement The generated AttributeValue element. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::instantiateParentElement($parent); diff --git a/src/XML/saml/Audience.php b/src/XML/saml/Audience.php index 14aaf20b6..cf04ac29c 100644 --- a/src/XML/saml/Audience.php +++ b/src/XML/saml/Audience.php @@ -66,7 +66,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Audience. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $element = $this->instantiateParentElement($parent); $element->textContent = $this->getContent(); diff --git a/src/XML/saml/AudienceRestriction.php b/src/XML/saml/AudienceRestriction.php index 0fbb4c1a3..7043c9ed6 100644 --- a/src/XML/saml/AudienceRestriction.php +++ b/src/XML/saml/AudienceRestriction.php @@ -68,7 +68,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this AudienceRestriction. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AuthnContext.php b/src/XML/saml/AuthnContext.php index 9f63c6d90..5c1b4a04a 100644 --- a/src/XML/saml/AuthnContext.php +++ b/src/XML/saml/AuthnContext.php @@ -154,7 +154,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this AuthnContextDeclRef to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AuthnContextDecl.php b/src/XML/saml/AuthnContextDecl.php index 79beda286..2630511c9 100644 --- a/src/XML/saml/AuthnContextDecl.php +++ b/src/XML/saml/AuthnContextDecl.php @@ -81,7 +81,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this AuthnContextDecl to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AuthnStatement.php b/src/XML/saml/AuthnStatement.php index 8a275c123..17a76b240 100644 --- a/src/XML/saml/AuthnStatement.php +++ b/src/XML/saml/AuthnStatement.php @@ -166,7 +166,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this AuthnStatement to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/AuthzDecisionStatement.php b/src/XML/saml/AuthzDecisionStatement.php index 9488a9305..04d56894e 100644 --- a/src/XML/saml/AuthzDecisionStatement.php +++ b/src/XML/saml/AuthzDecisionStatement.php @@ -145,7 +145,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this AuthzDecisionStatement to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/Conditions.php b/src/XML/saml/Conditions.php index b873c2b43..506635c31 100644 --- a/src/XML/saml/Conditions.php +++ b/src/XML/saml/Conditions.php @@ -195,7 +195,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The parent element we should append this element to. * @return \DOMElement This element, as XML. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/Evidence.php b/src/XML/saml/Evidence.php index 8f189c6e4..01bded9e5 100644 --- a/src/XML/saml/Evidence.php +++ b/src/XML/saml/Evidence.php @@ -129,7 +129,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/NameIDType.php b/src/XML/saml/NameIDType.php index 926fe3b9e..46f224970 100644 --- a/src/XML/saml/NameIDType.php +++ b/src/XML/saml/NameIDType.php @@ -111,7 +111,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this NameIDType. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/OneTimeUse.php b/src/XML/saml/OneTimeUse.php index a9b357562..d22d0d750 100644 --- a/src/XML/saml/OneTimeUse.php +++ b/src/XML/saml/OneTimeUse.php @@ -39,7 +39,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this OneTimeUse. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { return $this->instantiateParentElement($parent); } diff --git a/src/XML/saml/ProxyRestriction.php b/src/XML/saml/ProxyRestriction.php index 7301d0ccd..7b8759ef5 100644 --- a/src/XML/saml/ProxyRestriction.php +++ b/src/XML/saml/ProxyRestriction.php @@ -79,7 +79,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/Subject.php b/src/XML/saml/Subject.php index 175845b33..bb7c4ea1c 100644 --- a/src/XML/saml/Subject.php +++ b/src/XML/saml/Subject.php @@ -94,7 +94,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The parent element we should append this element to. * @return \DOMElement This element, as XML. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/SubjectConfirmation.php b/src/XML/saml/SubjectConfirmation.php index 790792d3f..7be8d92fd 100644 --- a/src/XML/saml/SubjectConfirmation.php +++ b/src/XML/saml/SubjectConfirmation.php @@ -105,7 +105,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The parent element we should append this element to. * @return \DOMElement This element, as XML. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('Method', $this->getMethod()); diff --git a/src/XML/saml/SubjectConfirmationData.php b/src/XML/saml/SubjectConfirmationData.php index 88480ce11..a3a2b7bc2 100644 --- a/src/XML/saml/SubjectConfirmationData.php +++ b/src/XML/saml/SubjectConfirmationData.php @@ -202,7 +202,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The parent element we should append this element to. * @return \DOMElement This element, as XML. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/SubjectLocality.php b/src/XML/saml/SubjectLocality.php index b16194199..292bfbd81 100644 --- a/src/XML/saml/SubjectLocality.php +++ b/src/XML/saml/SubjectLocality.php @@ -91,7 +91,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this SubjectLocality to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/saml/UnknownCondition.php b/src/XML/saml/UnknownCondition.php index 957a340c8..e2999da94 100644 --- a/src/XML/saml/UnknownCondition.php +++ b/src/XML/saml/UnknownCondition.php @@ -43,7 +43,7 @@ public function getRawCondition(): Chunk * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this unknown condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { return $this->getRawCondition()->toXML($parent); } diff --git a/src/XML/saml/UnknownID.php b/src/XML/saml/UnknownID.php index 876036b05..122d84c25 100644 --- a/src/XML/saml/UnknownID.php +++ b/src/XML/saml/UnknownID.php @@ -47,7 +47,7 @@ public function getRawIdentifier(): Chunk * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this unknown ID. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { return $this->getRawIdentifier()->toXML($parent); } diff --git a/src/XML/saml/UnknownStatement.php b/src/XML/saml/UnknownStatement.php index 1f352c4b4..0008fa1bc 100644 --- a/src/XML/saml/UnknownStatement.php +++ b/src/XML/saml/UnknownStatement.php @@ -43,7 +43,7 @@ public function getRawStatement(): Chunk * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this unknown statement. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { return $this->getRawStatement()->toXML($parent); } diff --git a/src/XML/samlp/AssertionIDRequest.php b/src/XML/samlp/AssertionIDRequest.php index fbe65d172..a6ad17789 100644 --- a/src/XML/samlp/AssertionIDRequest.php +++ b/src/XML/samlp/AssertionIDRequest.php @@ -158,7 +158,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this AssertionIDRequest element to. * @return \DOMElement */ - public function toUnsignedXML(DOMElement $parent = null): DOMElement + public function toUnsignedXML(?DOMElement $parent = null): DOMElement { $e = parent::toUnsignedXML($parent); diff --git a/src/XML/samlp/IDPEntry.php b/src/XML/samlp/IDPEntry.php index c69885dc2..9d6bf8bb3 100644 --- a/src/XML/samlp/IDPEntry.php +++ b/src/XML/samlp/IDPEntry.php @@ -97,7 +97,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this IDPEntry to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('ProviderID', $this->getProviderId()); diff --git a/src/XML/samlp/IDPList.php b/src/XML/samlp/IDPList.php index 97831eed0..54d6d9f35 100644 --- a/src/XML/samlp/IDPList.php +++ b/src/XML/samlp/IDPList.php @@ -106,7 +106,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this IDPList to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/samlp/NameIDPolicy.php b/src/XML/samlp/NameIDPolicy.php index 3b7a40f8e..cdc275caa 100644 --- a/src/XML/samlp/NameIDPolicy.php +++ b/src/XML/samlp/NameIDPolicy.php @@ -113,7 +113,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this NameIDPolicy to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/samlp/RequestedAuthnContext.php b/src/XML/samlp/RequestedAuthnContext.php index 02c9900fa..af3ffc3d3 100644 --- a/src/XML/samlp/RequestedAuthnContext.php +++ b/src/XML/samlp/RequestedAuthnContext.php @@ -112,7 +112,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this RequestedAuthnContext to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/samlp/Scoping.php b/src/XML/samlp/Scoping.php index fb3a0937e..7d63dff46 100644 --- a/src/XML/samlp/Scoping.php +++ b/src/XML/samlp/Scoping.php @@ -108,7 +108,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Scoping to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/samlp/Status.php b/src/XML/samlp/Status.php index ce3d9e75b..e43c9df72 100644 --- a/src/XML/samlp/Status.php +++ b/src/XML/samlp/Status.php @@ -123,7 +123,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Status. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/samlp/StatusCode.php b/src/XML/samlp/StatusCode.php index 5a2ed97c2..9b6919636 100644 --- a/src/XML/samlp/StatusCode.php +++ b/src/XML/samlp/StatusCode.php @@ -87,7 +87,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this StatusCode to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->setAttribute('Value', $this->getValue()); diff --git a/src/XML/samlp/StatusDetail.php b/src/XML/samlp/StatusDetail.php index b1ffda576..24e058226 100644 --- a/src/XML/samlp/StatusDetail.php +++ b/src/XML/samlp/StatusDetail.php @@ -71,7 +71,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this StatusDetail. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/shibmd/KeyAuthority.php b/src/XML/shibmd/KeyAuthority.php index 2e3cc424d..9e4c2bab6 100644 --- a/src/XML/shibmd/KeyAuthority.php +++ b/src/XML/shibmd/KeyAuthority.php @@ -99,7 +99,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Scope to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); diff --git a/src/XML/shibmd/Scope.php b/src/XML/shibmd/Scope.php index 9fcdd71bb..e5b759d93 100644 --- a/src/XML/shibmd/Scope.php +++ b/src/XML/shibmd/Scope.php @@ -85,7 +85,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement|null $parent The element we should append this Scope to. * @return \DOMElement */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = $this->instantiateParentElement($parent); $e->textContent = $this->getContent(); diff --git a/tests/SAML2/CustomBaseID.php b/tests/SAML2/CustomBaseID.php index e54cd43fe..ed64faba9 100644 --- a/tests/SAML2/CustomBaseID.php +++ b/tests/SAML2/CustomBaseID.php @@ -38,8 +38,8 @@ final class CustomBaseID extends AbstractBaseID */ public function __construct( protected array $audience, - string $NameQualifier = null, - string $SPNameQualifier = null, + ?string $NameQualifier = null, + ?string $SPNameQualifier = null, ) { Assert::allIsInstanceOf($audience, Audience::class); @@ -88,7 +88,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this BaseID. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::toXML($parent); diff --git a/tests/SAML2/CustomCondition.php b/tests/SAML2/CustomCondition.php index a0889690b..6b88b7709 100644 --- a/tests/SAML2/CustomCondition.php +++ b/tests/SAML2/CustomCondition.php @@ -88,7 +88,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Condition. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::toXML($parent); diff --git a/tests/SAML2/CustomRoleDescriptor.php b/tests/SAML2/CustomRoleDescriptor.php index 067089233..fba5d7403 100644 --- a/tests/SAML2/CustomRoleDescriptor.php +++ b/tests/SAML2/CustomRoleDescriptor.php @@ -174,7 +174,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this RoleDescriptor. */ - public function toUnsignedXML(DOMElement $parent = null): DOMElement + public function toUnsignedXML(?DOMElement $parent = null): DOMElement { $e = parent::toUnsignedXML($parent); diff --git a/tests/SAML2/CustomStatement.php b/tests/SAML2/CustomStatement.php index 019920964..edcba56f1 100644 --- a/tests/SAML2/CustomStatement.php +++ b/tests/SAML2/CustomStatement.php @@ -88,7 +88,7 @@ public static function fromXML(DOMElement $xml): static * @param \DOMElement $parent The element we are converting to XML. * @return \DOMElement The XML element after adding the data corresponding to this Statement. */ - public function toXML(DOMElement $parent = null): DOMElement + public function toXML(?DOMElement $parent = null): DOMElement { $e = parent::toXML($parent);