diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 7fcbcbd..d03bf13 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -19,9 +19,9 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['8.2', '8.3', '8.4', '8.5'] + php-version: ['8.3', '8.4', '8.5'] - uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.6 + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0 with: php-version: ${{ matrix.php-version }} @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false - uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.6 + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0 with: enable_eslinter: false enable_jsonlinter: true @@ -45,7 +45,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['8.2', '8.3', '8.4', '8.5'] + php-versions: ['8.3', '8.4', '8.5'] steps: - name: Setup PHP, with composer and extensions @@ -53,7 +53,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, dom, filter, pcre, spl, xml + extensions: ctype, dom, filter, intl, pcre, sodium, spl, xml tools: composer ini-values: error_reporting=E_ALL coverage: pcov @@ -107,7 +107,7 @@ jobs: fail-fast: true matrix: operating-system: [windows-latest] - php-versions: ['8.2', '8.3', '8.4', '8.5'] + php-versions: ['8.3', '8.4', '8.5'] steps: - name: Setup PHP, with composer and extensions @@ -115,7 +115,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, dom, filter, pcre, spl, xml + extensions: ctype, dom, filter, intl, pcre, sodium, spl, xml tools: composer ini-values: error_reporting=E_ALL coverage: none @@ -163,7 +163,7 @@ jobs: # Should be the higest supported version, so we can use the newest tools php-version: '8.5' tools: composer, composer-require-checker, composer-unused - extensions: ctype, dom, filter, pcre, spl, xml + extensions: ctype, dom, filter, intl, pcre, sodium, spl, xml coverage: none - name: Setup problem matchers for PHP @@ -215,7 +215,7 @@ jobs: uses: shivammathur/setup-php@v2 with: # Should be the lowest supported version - php-version: '8.2' + php-version: '8.3' extensions: ctype, dom, filter, pcre, spl, xml tools: composer coverage: none diff --git a/composer.json b/composer.json index 7e81b24..23657bf 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "ext-dom": "*", "ext-pcre": "*", @@ -18,7 +18,7 @@ "simplesamlphp/xml-common": "~2.4" }, "require-dev": { - "simplesamlphp/simplesamlphp-test-framework": "~1.10" + "simplesamlphp/simplesamlphp-test-framework": "~1.11" }, "autoload": { "psr-4": { diff --git a/src/SOAP11/Constants.php b/src/SOAP11/Constants.php index 260b6a9..6286b43 100644 --- a/src/SOAP11/Constants.php +++ b/src/SOAP11/Constants.php @@ -15,14 +15,14 @@ class Constants extends \SimpleSAML\XML\Constants /** * The namespace for the SOAP envelope 1.1. */ - public const NS_SOAP_ENV = 'http://schemas.xmlsoap.org/soap/envelope/'; + public const string NS_SOAP_ENV = 'http://schemas.xmlsoap.org/soap/envelope/'; /** * The namespace for SOAP encoding 1.1. */ - public const NS_SOAP_ENC = 'https://schemas.xmlsoap.org/soap/encoding/'; + public const string NS_SOAP_ENC = 'https://schemas.xmlsoap.org/soap/encoding/'; /** */ - public const SOAP_ACTOR_NEXT = 'http://schemas.xmlsoap.org/soap/actor/next'; + public const string SOAP_ACTOR_NEXT = 'http://schemas.xmlsoap.org/soap/actor/next'; } diff --git a/src/SOAP11/Type/EncodingStyleValue.php b/src/SOAP11/Type/EncodingStyleValue.php index 21f3246..49525c6 100644 --- a/src/SOAP11/Type/EncodingStyleValue.php +++ b/src/SOAP11/Type/EncodingStyleValue.php @@ -16,8 +16,7 @@ */ class EncodingStyleValue extends NMTokensValue { - /** @var string */ - public const SCHEMA_TYPE = 'encodingStyle'; + public const string SCHEMA_TYPE = 'encodingStyle'; /** @@ -25,7 +24,6 @@ class EncodingStyleValue extends NMTokensValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/SOAP11/Type/MustUnderstandValue.php b/src/SOAP11/Type/MustUnderstandValue.php index 203411e..c1ae7e8 100644 --- a/src/SOAP11/Type/MustUnderstandValue.php +++ b/src/SOAP11/Type/MustUnderstandValue.php @@ -14,12 +14,11 @@ use function boolval; /** - * @package simplesaml/xml-common + * @package simplesaml/xml-soap */ class MustUnderstandValue extends BooleanValue implements AttributeTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'boolean'; + public const string SCHEMA_TYPE = 'boolean'; /** @@ -27,7 +26,6 @@ class MustUnderstandValue extends BooleanValue implements AttributeTypeInterface * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -37,8 +35,6 @@ protected function validateValue(string $value): void /** - * @param boolean $value - * @return static */ public static function fromBoolean(bool $value): static { @@ -49,7 +45,6 @@ public static function fromBoolean(bool $value): static /** - * @return boolean $value */ public function toBoolean(): bool { diff --git a/src/SOAP11/XML/AbstractSoapElement.php b/src/SOAP11/XML/AbstractSoapElement.php index 3a118ba..fd5ea01 100644 --- a/src/SOAP11/XML/AbstractSoapElement.php +++ b/src/SOAP11/XML/AbstractSoapElement.php @@ -14,12 +14,9 @@ */ abstract class AbstractSoapElement extends AbstractElement { - /** @var string */ - public const NS = C::NS_SOAP_ENV; + public const string NS = C::NS_SOAP_ENV; - /** @var string */ - public const NS_PREFIX = 'SOAP-ENV'; + public const string NS_PREFIX = 'SOAP-ENV'; - /** @var string */ - public const SCHEMA = 'resources/schemas/soap-envelope-1.1.xsd'; + public const string SCHEMA = 'resources/schemas/soap-envelope-1.1.xsd'; } diff --git a/src/SOAP11/XML/Body.php b/src/SOAP11/XML/Body.php index f814361..0ff3fed 100644 --- a/src/SOAP11/XML/Body.php +++ b/src/SOAP11/XML/Body.php @@ -32,10 +32,10 @@ final class Body extends AbstractSoapElement implements SchemaValidatableElement /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::ANY; + public const string XS_ANY_ATTR_NAMESPACE = NS::ANY; /** @@ -87,8 +87,6 @@ public function getFault(): ?Fault /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -100,7 +98,6 @@ public function isEmptyElement(): bool * Convert XML into an Body element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -121,7 +118,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Body to XML. * * @param \DOMElement|null $parent The element we should add this Body to. - * @return \DOMElement This Body-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP11/XML/Detail.php b/src/SOAP11/XML/Detail.php index 4f0c249..b221f66 100644 --- a/src/SOAP11/XML/Detail.php +++ b/src/SOAP11/XML/Detail.php @@ -23,20 +23,17 @@ final class Detail extends AbstractElement use ExtendableElementTrait; - /** @var string */ - public const LOCALNAME = 'detail'; + public const string LOCALNAME = 'detail'; - /** @var null */ - public const NS = null; + public const null NS = null; - /** @var null */ - public const NS_PREFIX = null; + public const null NS_PREFIX = null; /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::ANY; + public const string XS_ANY_ATTR_NAMESPACE = NS::ANY; /** @@ -54,8 +51,6 @@ public function __construct(array $children = [], array $namespacedAttributes = /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -67,7 +62,6 @@ public function isEmptyElement(): bool * Convert XML into an Detail element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -88,7 +82,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Detail to XML. * * @param \DOMElement|null $parent The element we should add this Detail to. - * @return \DOMElement This Detail-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP11/XML/Envelope.php b/src/SOAP11/XML/Envelope.php index b55bd11..3476918 100644 --- a/src/SOAP11/XML/Envelope.php +++ b/src/SOAP11/XML/Envelope.php @@ -28,10 +28,10 @@ final class Envelope extends AbstractSoapElement implements SchemaValidatableEle /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::OTHER; + public const string XS_ANY_ELT_NAMESPACE = NS::OTHER; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -75,7 +75,6 @@ public function getHeader(): ?Header * Convert XML into an Envelope element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -104,7 +103,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Envelope to XML. * * @param \DOMElement|null $parent The element we should add this envelope to. - * @return \DOMElement This Envelope-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP11/XML/Fault.php b/src/SOAP11/XML/Fault.php index 8cda4ce..2e7991c 100644 --- a/src/SOAP11/XML/Fault.php +++ b/src/SOAP11/XML/Fault.php @@ -79,7 +79,6 @@ public function getDetail(): ?Detail * Convert XML into an Fault element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -119,7 +118,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Fault to XML. * * @param \DOMElement|null $parent The element we should add this fault to. - * @return \DOMElement This Fault-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP11/XML/FaultActor.php b/src/SOAP11/XML/FaultActor.php index 65b571d..b870d16 100644 --- a/src/SOAP11/XML/FaultActor.php +++ b/src/SOAP11/XML/FaultActor.php @@ -18,15 +18,11 @@ final class FaultActor extends AbstractElement use TypedTextContentTrait; - /** @var string */ - public const LOCALNAME = 'faultactor'; + public const string LOCALNAME = 'faultactor'; - /** @var null */ - public const NS = null; + public const null NS = null; - /** @var null */ - public const NS_PREFIX = null; + public const null NS_PREFIX = null; - /** @var string */ - public const TEXTCONTENT_TYPE = AnyURIValue::class; + public const string TEXTCONTENT_TYPE = AnyURIValue::class; } diff --git a/src/SOAP11/XML/FaultCode.php b/src/SOAP11/XML/FaultCode.php index 2639048..781ed93 100644 --- a/src/SOAP11/XML/FaultCode.php +++ b/src/SOAP11/XML/FaultCode.php @@ -18,15 +18,11 @@ final class FaultCode extends AbstractElement use TypedTextContentTrait; - /** @var string */ - public const LOCALNAME = 'faultcode'; + public const string LOCALNAME = 'faultcode'; - /** @var null */ - public const NS = null; + public const null NS = null; - /** @var null */ - public const NS_PREFIX = null; + public const null NS_PREFIX = null; - /** @var string */ - public const TEXTCONTENT_TYPE = QNameValue::class; + public const string TEXTCONTENT_TYPE = QNameValue::class; } diff --git a/src/SOAP11/XML/FaultString.php b/src/SOAP11/XML/FaultString.php index c8ddd55..202ad85 100644 --- a/src/SOAP11/XML/FaultString.php +++ b/src/SOAP11/XML/FaultString.php @@ -18,15 +18,11 @@ final class FaultString extends AbstractElement use TypedTextContentTrait; - /** @var string */ - public const LOCALNAME = 'faultstring'; + public const string LOCALNAME = 'faultstring'; - /** @var null */ - public const NS = null; + public const null NS = null; - /** @var null */ - public const NS_PREFIX = null; + public const null NS_PREFIX = null; - /** @var string */ - public const TEXTCONTENT_TYPE = StringValue::class; + public const string TEXTCONTENT_TYPE = StringValue::class; } diff --git a/src/SOAP11/XML/Header.php b/src/SOAP11/XML/Header.php index cc15a89..e7efa5d 100644 --- a/src/SOAP11/XML/Header.php +++ b/src/SOAP11/XML/Header.php @@ -26,10 +26,10 @@ final class Header extends AbstractSoapElement implements SchemaValidatableEleme /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::OTHER; + public const string XS_ANY_ELT_NAMESPACE = NS::OTHER; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -47,8 +47,6 @@ public function __construct(array $children = [], array $namespacedAttributes = /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -60,7 +58,6 @@ public function isEmptyElement(): bool * Convert XML into an Header element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -81,7 +78,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Header to XML. * * @param \DOMElement|null $parent The element we should add this header to. - * @return \DOMElement This Header-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/Constants.php b/src/SOAP12/Constants.php index ab77d82..49192e6 100644 --- a/src/SOAP12/Constants.php +++ b/src/SOAP12/Constants.php @@ -15,10 +15,10 @@ class Constants extends \SimpleSAML\XML\Constants /** * The namespace for the SOAP envelope 1.2. */ - public const NS_SOAP_ENV = 'http://www.w3.org/2003/05/soap-envelope'; + public const string NS_SOAP_ENV = 'http://www.w3.org/2003/05/soap-envelope'; /** * The namespace for SOAP encoding 1.2. */ - public const NS_SOAP_ENC = 'http://www.w3.org/2003/05/soap-encoding'; + public const string NS_SOAP_ENC = 'http://www.w3.org/2003/05/soap-encoding'; } diff --git a/src/SOAP12/XML/AbstractSoapElement.php b/src/SOAP12/XML/AbstractSoapElement.php index 597af60..23c0f36 100644 --- a/src/SOAP12/XML/AbstractSoapElement.php +++ b/src/SOAP12/XML/AbstractSoapElement.php @@ -14,12 +14,9 @@ */ abstract class AbstractSoapElement extends AbstractElement { - /** @var string */ - public const NS = C::NS_SOAP_ENV; + public const string NS = C::NS_SOAP_ENV; - /** @var string */ - public const NS_PREFIX = 'env'; + public const string NS_PREFIX = 'env'; - /** @var string */ - public const SCHEMA = 'resources/schemas/soap-envelope-1.2.xsd'; + public const string SCHEMA = 'resources/schemas/soap-envelope-1.2.xsd'; } diff --git a/src/SOAP12/XML/Body.php b/src/SOAP12/XML/Body.php index be8bbf5..db8b2fc 100644 --- a/src/SOAP12/XML/Body.php +++ b/src/SOAP12/XML/Body.php @@ -29,10 +29,10 @@ final class Body extends AbstractSoapElement implements SchemaValidatableElement /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -76,8 +76,6 @@ public function getFault(): ?Fault /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -89,7 +87,6 @@ public function isEmptyElement(): bool * Convert XML into an Body element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -118,7 +115,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Body to XML. * * @param \DOMElement|null $parent The element we should add this Body to. - * @return \DOMElement This Body-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Code.php b/src/SOAP12/XML/Code.php index 476b2e1..d0c5cc4 100644 --- a/src/SOAP12/XML/Code.php +++ b/src/SOAP12/XML/Code.php @@ -52,7 +52,6 @@ public function getSubcode(): ?Subcode * Convert XML into an Code element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -79,7 +78,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Code to XML. * * @param \DOMElement|null $parent The element we should add this code to. - * @return \DOMElement This Code-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Detail.php b/src/SOAP12/XML/Detail.php index 169168f..1852371 100644 --- a/src/SOAP12/XML/Detail.php +++ b/src/SOAP12/XML/Detail.php @@ -23,10 +23,10 @@ final class Detail extends AbstractSoapElement /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -44,8 +44,6 @@ public function __construct(array $children = [], array $namespacedAttributes = /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -57,7 +55,6 @@ public function isEmptyElement(): bool * Convert XML into an Detail element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -78,7 +75,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Detail to XML. * * @param \DOMElement|null $parent The element we should add this Detail to. - * @return \DOMElement This Detail-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Envelope.php b/src/SOAP12/XML/Envelope.php index c097273..f057ccd 100644 --- a/src/SOAP12/XML/Envelope.php +++ b/src/SOAP12/XML/Envelope.php @@ -26,7 +26,7 @@ final class Envelope extends AbstractSoapElement implements SchemaValidatableEle /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -67,7 +67,6 @@ public function getHeader(): ?Header * Convert XML into an Envelope element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -95,7 +94,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Envelope to XML. * * @param \DOMElement|null $parent The element we should add this envelope to. - * @return \DOMElement This Envelope-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Fault.php b/src/SOAP12/XML/Fault.php index 814f36d..fe44c8b 100644 --- a/src/SOAP12/XML/Fault.php +++ b/src/SOAP12/XML/Fault.php @@ -91,7 +91,6 @@ public function getDetail(): ?Detail * Convert XML into an Fault element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -130,7 +129,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Fault to XML. * * @param \DOMElement|null $parent The element we should add this fault to. - * @return \DOMElement This Fault-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Header.php b/src/SOAP12/XML/Header.php index ce25bcb..73926e0 100644 --- a/src/SOAP12/XML/Header.php +++ b/src/SOAP12/XML/Header.php @@ -26,10 +26,10 @@ final class Header extends AbstractSoapElement implements SchemaValidatableEleme /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** @@ -47,8 +47,6 @@ public function __construct(array $children = [], array $namespacedAttributes = /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -60,7 +58,6 @@ public function isEmptyElement(): bool * Convert XML into an Header element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -81,7 +78,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Header to XML. * * @param \DOMElement|null $parent The element we should add this header to. - * @return \DOMElement This Header-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Node.php b/src/SOAP12/XML/Node.php index af34616..f2eb1ed 100644 --- a/src/SOAP12/XML/Node.php +++ b/src/SOAP12/XML/Node.php @@ -17,6 +17,5 @@ final class Node extends AbstractSoapElement use TypedTextContentTrait; - /** @var string */ - public const TEXTCONTENT_TYPE = AnyURIValue::class; + public const string TEXTCONTENT_TYPE = AnyURIValue::class; } diff --git a/src/SOAP12/XML/NotUnderstood.php b/src/SOAP12/XML/NotUnderstood.php index 0d9a611..43449f6 100644 --- a/src/SOAP12/XML/NotUnderstood.php +++ b/src/SOAP12/XML/NotUnderstood.php @@ -47,7 +47,6 @@ public function getQName(): QNameValue * Convert XML into a NotUnderstood element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -68,7 +67,6 @@ public static function fromXML(DOMElement $xml): static * Convert this NotUnderstood to XML. * * @param \DOMElement|null $parent The element we should add this Body to. - * @return \DOMElement This NotUnderstood-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Reason.php b/src/SOAP12/XML/Reason.php index 6fc55d8..586198c 100644 --- a/src/SOAP12/XML/Reason.php +++ b/src/SOAP12/XML/Reason.php @@ -40,29 +40,10 @@ public function getText(): array } - /** - * Convert this element to XML. - * - * @param \DOMElement|null $parent The element we should append this element to. - * @return \DOMElement - */ - public function toXML(?DOMElement $parent = null): DOMElement - { - $e = $this->instantiateParentElement($parent); - - foreach ($this->getText() as $text) { - $text->toXML($e); - } - - return $e; - } - - /** * Convert XML into a Value * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -77,4 +58,21 @@ public static function fromXML(DOMElement $xml): static return new static($text); } + + + /** + * Convert this element to XML. + * + * @param \DOMElement|null $parent The element we should append this element to. + */ + public function toXML(?DOMElement $parent = null): DOMElement + { + $e = $this->instantiateParentElement($parent); + + foreach ($this->getText() as $text) { + $text->toXML($e); + } + + return $e; + } } diff --git a/src/SOAP12/XML/Role.php b/src/SOAP12/XML/Role.php index b8af371..8da6aeb 100644 --- a/src/SOAP12/XML/Role.php +++ b/src/SOAP12/XML/Role.php @@ -17,6 +17,5 @@ final class Role extends AbstractSoapElement use TypedTextContentTrait; - /** @var string */ - public const TEXTCONTENT_TYPE = AnyURIValue::class; + public const string TEXTCONTENT_TYPE = AnyURIValue::class; } diff --git a/src/SOAP12/XML/Subcode.php b/src/SOAP12/XML/Subcode.php index d88625d..21494bf 100644 --- a/src/SOAP12/XML/Subcode.php +++ b/src/SOAP12/XML/Subcode.php @@ -52,7 +52,6 @@ public function getSubcode(): ?Subcode * Convert XML into an Subcode element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -79,7 +78,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Subcode to XML. * * @param \DOMElement|null $parent The element we should add this subcode to. - * @return \DOMElement This Subcode-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/SupportedEnvelope.php b/src/SOAP12/XML/SupportedEnvelope.php index 363ac34..c39cffd 100644 --- a/src/SOAP12/XML/SupportedEnvelope.php +++ b/src/SOAP12/XML/SupportedEnvelope.php @@ -44,7 +44,6 @@ public function getQName(): QNameValue * Convert XML into a SupportedEnvelope element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -65,7 +64,6 @@ public static function fromXML(DOMElement $xml): static * Convert this SupportedEnvelope to XML. * * @param \DOMElement|null $parent The element we should add this Body to. - * @return \DOMElement This SupportedEnvelope-element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Text.php b/src/SOAP12/XML/Text.php index 339699c..20dd1df 100644 --- a/src/SOAP12/XML/Text.php +++ b/src/SOAP12/XML/Text.php @@ -60,7 +60,6 @@ public function getContent(): StringValue * Convert XML into a env:Text element * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong @@ -86,7 +85,6 @@ public static function fromXML(DOMElement $xml): static * Convert this Text element to XML. * * @param \DOMElement|null $parent The element we should append this Text element to. - * @return \DOMElement */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/SOAP12/XML/Upgrade.php b/src/SOAP12/XML/Upgrade.php index a90103e..58f2ea3 100644 --- a/src/SOAP12/XML/Upgrade.php +++ b/src/SOAP12/XML/Upgrade.php @@ -49,7 +49,6 @@ public function getSupportedEnvelope(): array * Convert this element to XML. * * @param \DOMElement|null $parent The element we should append this element to. - * @return \DOMElement */ public function toXML(?DOMElement $parent = null): DOMElement { @@ -67,7 +66,6 @@ public function toXML(?DOMElement $parent = null): DOMElement * Convert XML into a Upgrade * * @param \DOMElement $xml The XML element we should load - * @return static * * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException * If the qualified name of the supplied element is wrong diff --git a/src/SOAP12/XML/Value.php b/src/SOAP12/XML/Value.php index bef9b7d..042214c 100644 --- a/src/SOAP12/XML/Value.php +++ b/src/SOAP12/XML/Value.php @@ -17,6 +17,5 @@ final class Value extends AbstractSoapElement use TypedTextContentTrait; - /** @var string */ - public const TEXTCONTENT_TYPE = QNameValue::class; + public const string TEXTCONTENT_TYPE = QNameValue::class; } diff --git a/tests/SOAP11/Assert/MustUnderstandTest.php b/tests/SOAP11/Assert/MustUnderstandTest.php index 3c1a2f6..f770671 100644 --- a/tests/SOAP11/Assert/MustUnderstandTest.php +++ b/tests/SOAP11/Assert/MustUnderstandTest.php @@ -19,8 +19,6 @@ final class MustUnderstandTest extends TestCase { /** - * @param boolean $shouldPass - * @param string $mustUnderstand */ #[DataProvider('provideInvalidMustUnderstand')] #[DataProvider('provideValidMustUnderstand')] diff --git a/tests/SOAP11/Type/EncodingStyleValueTest.php b/tests/SOAP11/Type/EncodingStyleValueTest.php index 63e271a..b534c2d 100644 --- a/tests/SOAP11/Type/EncodingStyleValueTest.php +++ b/tests/SOAP11/Type/EncodingStyleValueTest.php @@ -19,8 +19,6 @@ final class EncodingStyleValueTest extends TestCase { /** - * @param string $encodingStyle - * @param bool $shouldPass */ #[DataProvider('provideEncodingStyle')] public function testEncodingStyleValue(string $encodingStyle, bool $shouldPass): void diff --git a/tests/SOAP11/Type/MustUnderstandValueTest.php b/tests/SOAP11/Type/MustUnderstandValueTest.php index a97ba40..f7568ab 100644 --- a/tests/SOAP11/Type/MustUnderstandValueTest.php +++ b/tests/SOAP11/Type/MustUnderstandValueTest.php @@ -23,8 +23,6 @@ final class MustUnderstandValueTest extends TestCase { /** - * @param boolean $shouldPass - * @param string $mustUnderstand */ #[DataProvider('provideInvalidMustUnderstand')] #[DataProvider('provideValidMustUnderstand')] diff --git a/tests/SOAP11/XML/BodyTest.php b/tests/SOAP11/XML/BodyTest.php index 4a714e1..b9a99ea 100644 --- a/tests/SOAP11/XML/BodyTest.php +++ b/tests/SOAP11/XML/BodyTest.php @@ -38,7 +38,6 @@ final class BodyTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $BodyContent */ private static DOMElement $BodyContent; diff --git a/tests/SOAP11/XML/DetailTest.php b/tests/SOAP11/XML/DetailTest.php index e302f88..e47192f 100644 --- a/tests/SOAP11/XML/DetailTest.php +++ b/tests/SOAP11/XML/DetailTest.php @@ -30,7 +30,6 @@ final class DetailTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $DetailContent */ private static DOMElement $DetailContent; diff --git a/tests/SOAP11/XML/EnvelopeTest.php b/tests/SOAP11/XML/EnvelopeTest.php index 2811866..3c3a928 100644 --- a/tests/SOAP11/XML/EnvelopeTest.php +++ b/tests/SOAP11/XML/EnvelopeTest.php @@ -34,13 +34,10 @@ final class EnvelopeTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $bodyContent */ private static DOMElement $bodyContent; - /** @var \DOMElement $headerContent */ private static DOMElement $headerContent; - /** @var \DOMElement $envelopeContent */ private static DOMElement $envelopeContent; diff --git a/tests/SOAP11/XML/HeaderTest.php b/tests/SOAP11/XML/HeaderTest.php index 43898aa..d4b663d 100644 --- a/tests/SOAP11/XML/HeaderTest.php +++ b/tests/SOAP11/XML/HeaderTest.php @@ -32,7 +32,6 @@ final class HeaderTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $headerContent */ private static DOMElement $headerContent; diff --git a/tests/SOAP12/XML/BodyTest.php b/tests/SOAP12/XML/BodyTest.php index 15f2f1e..49d3f03 100644 --- a/tests/SOAP12/XML/BodyTest.php +++ b/tests/SOAP12/XML/BodyTest.php @@ -41,7 +41,6 @@ final class BodyTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $BodyContent */ private static DOMElement $BodyContent; diff --git a/tests/SOAP12/XML/DetailTest.php b/tests/SOAP12/XML/DetailTest.php index ab004a3..08ef0d9 100644 --- a/tests/SOAP12/XML/DetailTest.php +++ b/tests/SOAP12/XML/DetailTest.php @@ -30,7 +30,6 @@ final class DetailTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $DetailContent */ private static DOMElement $DetailContent; diff --git a/tests/SOAP12/XML/EnvelopeTest.php b/tests/SOAP12/XML/EnvelopeTest.php index b17c3b4..b901bfd 100644 --- a/tests/SOAP12/XML/EnvelopeTest.php +++ b/tests/SOAP12/XML/EnvelopeTest.php @@ -34,10 +34,8 @@ final class EnvelopeTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $bodyContent */ private static DOMElement $bodyContent; - /** @var \DOMElement $headerContent */ private static DOMElement $headerContent; diff --git a/tests/SOAP12/XML/HeaderTest.php b/tests/SOAP12/XML/HeaderTest.php index 324d4e6..15caad2 100644 --- a/tests/SOAP12/XML/HeaderTest.php +++ b/tests/SOAP12/XML/HeaderTest.php @@ -32,7 +32,6 @@ final class HeaderTest extends TestCase use SerializableElementTestTrait; - /** @var \DOMElement $headerContent */ private static DOMElement $headerContent;