diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f0bb073..10eaca7 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, date, dom, filter, pcre, soap, spl, xml + extensions: ctype, date, dom, filter, intl, pcre, soap, 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, date, dom, filter, pcre, soap, spl, xml + extensions: ctype, date, dom, filter, intl, pcre, soap, 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, phpcs - extensions: ctype, date, dom, filter, pcre, soap, spl, xml + extensions: ctype, date, dom, filter, intl, pcre, soap, 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, date, dom, filter, pcre, soap, spl, xml tools: composer coverage: none diff --git a/composer.json b/composer.json index fb030e9..10c11c4 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "ext-dom": "*", "ext-spl": "*", @@ -19,7 +19,7 @@ "simplesamlphp/xml-wss-core": "~1.1" }, "require-dev": { - "simplesamlphp/simplesamlphp-test-framework": "~1.10", + "simplesamlphp/simplesamlphp-test-framework": "~1.11", "simplesamlphp/xml-ws-addressing": "~1.1" }, "autoload": { diff --git a/src/Constants.php b/src/Constants.php index b22c1e5..e9b87f6 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -15,10 +15,10 @@ class Constants extends \SimpleSAML\WebServices\Security\Constants /** * The namespace for WS-Policy protocol. */ - public const NS_POLICY_200409 = 'http://schemas.xmlsoap.org/ws/2004/09/policy'; + public const string NS_POLICY_200409 = 'http://schemas.xmlsoap.org/ws/2004/09/policy'; /** * The namespace for WS-Policy 1.5 protocol. */ - public const NS_POLICY_200607 = 'http://www.w3.org/2006/07/ws-policy'; + public const string NS_POLICY_200607 = 'http://www.w3.org/2006/07/ws-policy'; } diff --git a/src/XML/wsp_200409/AbstractOperatorContentType.php b/src/XML/wsp_200409/AbstractOperatorContentType.php index 169ebc1..4961e2c 100644 --- a/src/XML/wsp_200409/AbstractOperatorContentType.php +++ b/src/XML/wsp_200409/AbstractOperatorContentType.php @@ -26,10 +26,10 @@ abstract class AbstractOperatorContentType extends AbstractWspElement /** 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 exclusions for the xs:any element */ - public const XS_ANY_ELT_EXCLUSIONS = [ + public const array XS_ANY_ELT_EXCLUSIONS = [ ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'All'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'ExactlyOne'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Policy'], @@ -82,8 +82,6 @@ public function getOperatorContent(): array /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -96,7 +94,6 @@ public function isEmptyElement(): bool * Convert XML into an wsp:OperatorContentType 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 @@ -122,7 +119,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:OperatorContentType to XML. * * @param \DOMElement|null $parent The element we should add this wsp:OperatorContentType to. - * @return \DOMElement This wsp:AbstractOperatorContentType element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200409/AbstractWspElement.php b/src/XML/wsp_200409/AbstractWspElement.php index 3271a79..b6df7fa 100644 --- a/src/XML/wsp_200409/AbstractWspElement.php +++ b/src/XML/wsp_200409/AbstractWspElement.php @@ -14,12 +14,9 @@ */ abstract class AbstractWspElement extends AbstractElement { - /** @var string */ - public const NS = C::NS_POLICY_200409; + public const string NS = C::NS_POLICY_200409; - /** @var string */ - public const NS_PREFIX = 'wsp'; + public const string NS_PREFIX = 'wsp'; - /** @var string */ - public const SCHEMA = 'resources/schemas/ws-policy-200409.xsd'; + public const string SCHEMA = 'resources/schemas/ws-policy-200409.xsd'; } diff --git a/src/XML/wsp_200409/AppliesTo.php b/src/XML/wsp_200409/AppliesTo.php index 143d60f..5fd405a 100644 --- a/src/XML/wsp_200409/AppliesTo.php +++ b/src/XML/wsp_200409/AppliesTo.php @@ -26,10 +26,10 @@ final class AppliesTo extends AbstractWspElement implements SchemaValidatableEle /** 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; /** @@ -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 wsp:AppliesTo 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 wsp:AppliesTo to XML. * * @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to. - * @return \DOMElement This wsp:AppliesTo element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200409/OptionalTrait.php b/src/XML/wsp_200409/OptionalTrait.php index 28406ee..e8bbea6 100644 --- a/src/XML/wsp_200409/OptionalTrait.php +++ b/src/XML/wsp_200409/OptionalTrait.php @@ -15,16 +15,12 @@ trait OptionalTrait { /** * The Optional. - * - * @var bool */ protected bool $Optional; /** * Collect the value of the Optional-property - * - * @return bool */ public function getOptional(): bool { @@ -34,8 +30,6 @@ public function getOptional(): bool /** * Set the value of the Optional-property - * - * @param bool $Optional */ protected function setOptional(?bool $Optional): void { diff --git a/src/XML/wsp_200409/Policy.php b/src/XML/wsp_200409/Policy.php index 056e37e..6e8fbb2 100644 --- a/src/XML/wsp_200409/Policy.php +++ b/src/XML/wsp_200409/Policy.php @@ -29,16 +29,16 @@ final class Policy extends AbstractOperatorContentType implements SchemaValidata /** 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; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Name'], ['http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Id'], ]; /** The exclusions for the xs:any element */ - public const XS_ANY_ELT_EXCLUSIONS = [ + public const array XS_ANY_ELT_EXCLUSIONS = [ ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'All'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'ExactlyOne'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Policy'], @@ -92,8 +92,6 @@ public function getName(): ?AnyURIValue /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ final public function isEmptyElement(): bool { @@ -108,7 +106,6 @@ final public function isEmptyElement(): bool * Convert XML into an wsp:Policy 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 @@ -143,7 +140,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:Policy to XML. * * @param \DOMElement|null $parent The element we should add this wsp:Policy to - * @return \DOMElement This wsp:Policy element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200409/PolicyAttachment.php b/src/XML/wsp_200409/PolicyAttachment.php index 9b19cf2..6c4a33d 100644 --- a/src/XML/wsp_200409/PolicyAttachment.php +++ b/src/XML/wsp_200409/PolicyAttachment.php @@ -31,10 +31,10 @@ final class PolicyAttachment extends AbstractWspElement implements SchemaValidat /** 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::ANY; + public const string XS_ANY_ATTR_NAMESPACE = NS::ANY; /** @@ -94,7 +94,6 @@ public function getPolicies(): array * Convert XML into an wsp:PolicyAttachment 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 @@ -127,7 +126,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:PolicyAttachment to XML. * * @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to. - * @return \DOMElement This wsp:AppliesTo element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200409/PolicyReference.php b/src/XML/wsp_200409/PolicyReference.php index bcbc942..591badc 100644 --- a/src/XML/wsp_200409/PolicyReference.php +++ b/src/XML/wsp_200409/PolicyReference.php @@ -26,10 +26,10 @@ final class PolicyReference extends AbstractWspElement implements SchemaValidata /** 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; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ [null, 'Digest'], [null, 'DigestAlgorithm'], [null, 'URI'], @@ -85,7 +85,6 @@ public function getDigestAlgorithm(): ?AnyURIValue * Convert XML into an wsp:PolicyReference 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 @@ -108,7 +107,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:PolicyReference to XML. * * @param \DOMElement|null $parent The element we should add this wsp:Policy to - * @return \DOMElement This wsp:PolicyReference element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/AbstractOperatorContentType.php b/src/XML/wsp_200607/AbstractOperatorContentType.php index 2f2c587..e6fdfdd 100644 --- a/src/XML/wsp_200607/AbstractOperatorContentType.php +++ b/src/XML/wsp_200607/AbstractOperatorContentType.php @@ -26,10 +26,10 @@ abstract class AbstractOperatorContentType extends AbstractWspElement /** 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 exclusions for the xs:any element */ - public const XS_ANY_ELT_EXCLUSIONS = [ + public const array XS_ANY_ELT_EXCLUSIONS = [ ['http://www.w3.org/2006/07/ws-policy', 'All'], ['http://www.w3.org/2006/07/ws-policy', 'ExactlyOne'], ['http://www.w3.org/2006/07/ws-policy', 'Policy'], @@ -84,8 +84,6 @@ public function getOperatorContent(): array /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -98,7 +96,6 @@ public function isEmptyElement(): bool * Convert XML into an wsp:OperatorContentType 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 @@ -124,7 +121,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:OperatorContentType to XML. * * @param \DOMElement|null $parent The element we should add this wsp:OperatorContentType to. - * @return \DOMElement This wsp:AbstractOperatorContentType element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/AbstractURI.php b/src/XML/wsp_200607/AbstractURI.php index de029e3..d091c8d 100644 --- a/src/XML/wsp_200607/AbstractURI.php +++ b/src/XML/wsp_200607/AbstractURI.php @@ -25,11 +25,10 @@ abstract class AbstractURI extends AbstractWspElement use TypedTextContentTrait; - /** @var string */ - public const TEXTCONTENT_TYPE = AnyURIValue::class; + public const string TEXTCONTENT_TYPE = AnyURIValue::class; /** 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; /** @@ -51,7 +50,6 @@ public function __construct( * Convert XML into an wsp:URI type 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 @@ -72,7 +70,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:URI type to XML. * * @param \DOMElement|null $parent The element we should add this wsp:URI to. - * @return \DOMElement This wsp:URI type element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/AbstractWspElement.php b/src/XML/wsp_200607/AbstractWspElement.php index fe95f09..9bd9722 100644 --- a/src/XML/wsp_200607/AbstractWspElement.php +++ b/src/XML/wsp_200607/AbstractWspElement.php @@ -14,12 +14,9 @@ */ abstract class AbstractWspElement extends AbstractElement { - /** @var string */ - public const NS = C::NS_POLICY_200607; + public const string NS = C::NS_POLICY_200607; - /** @var string */ - public const NS_PREFIX = 'wsp'; + public const string NS_PREFIX = 'wsp'; - /** @var string */ - public const SCHEMA = 'resources/schemas/ws-policy-200607.xsd'; + public const string SCHEMA = 'resources/schemas/ws-policy-200607.xsd'; } diff --git a/src/XML/wsp_200607/AppliesTo.php b/src/XML/wsp_200607/AppliesTo.php index 202efd2..ad4fef1 100644 --- a/src/XML/wsp_200607/AppliesTo.php +++ b/src/XML/wsp_200607/AppliesTo.php @@ -26,10 +26,10 @@ final class AppliesTo extends AbstractWspElement implements SchemaValidatableEle /** 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; /** @@ -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 wsp:AppliesTo 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 wsp:AppliesTo to XML. * * @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to. - * @return \DOMElement This wsp:AppliesTo element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/IgnorableTrait.php b/src/XML/wsp_200607/IgnorableTrait.php index bc71794..8f53d49 100644 --- a/src/XML/wsp_200607/IgnorableTrait.php +++ b/src/XML/wsp_200607/IgnorableTrait.php @@ -15,16 +15,12 @@ trait IgnorableTrait { /** * The Ignorable. - * - * @var bool */ protected bool $Ignorable; /** * Collect the value of the Ignorable-property - * - * @return bool */ public function getIgnorable(): bool { @@ -34,8 +30,6 @@ public function getIgnorable(): bool /** * Set the value of the Ignorable-property - * - * @param bool $Ignorable */ protected function setIgnorable(?bool $Ignorable): void { diff --git a/src/XML/wsp_200607/OptionalTrait.php b/src/XML/wsp_200607/OptionalTrait.php index 5323b28..e19c3dd 100644 --- a/src/XML/wsp_200607/OptionalTrait.php +++ b/src/XML/wsp_200607/OptionalTrait.php @@ -15,16 +15,12 @@ trait OptionalTrait { /** * The Optional. - * - * @var bool */ protected bool $Optional; /** * Collect the value of the Optional-property - * - * @return bool */ public function getOptional(): bool { @@ -34,8 +30,6 @@ public function getOptional(): bool /** * Set the value of the Optional-property - * - * @param bool $Optional */ protected function setOptional(?bool $Optional): void { diff --git a/src/XML/wsp_200607/Policy.php b/src/XML/wsp_200607/Policy.php index 1a12200..6fca69f 100644 --- a/src/XML/wsp_200607/Policy.php +++ b/src/XML/wsp_200607/Policy.php @@ -27,15 +27,15 @@ final class Policy extends AbstractOperatorContentType implements SchemaValidata /** 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; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ ['http://www.w3.org/2006/07/ws-policy', 'Name'], ]; /** The exclusions for the xs:any element */ - public const XS_ANY_ELT_EXCLUSIONS = [ + public const array XS_ANY_ELT_EXCLUSIONS = [ ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'All'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'ExactlyOne'], ['http://schemas.xmlsoap.org/ws/2004/09/policy', 'Policy'], @@ -78,8 +78,6 @@ public function getName(): ?AnyURIValue /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ final public function isEmptyElement(): bool { @@ -93,7 +91,6 @@ final public function isEmptyElement(): bool * Convert XML into an wsp:Policy 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 @@ -122,7 +119,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:Policy to XML. * * @param \DOMElement|null $parent The element we should add this wsp:Policy to - * @return \DOMElement This wsp:Policy element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/PolicyAttachment.php b/src/XML/wsp_200607/PolicyAttachment.php index c7a21dd..08fc4b1 100644 --- a/src/XML/wsp_200607/PolicyAttachment.php +++ b/src/XML/wsp_200607/PolicyAttachment.php @@ -31,10 +31,10 @@ final class PolicyAttachment extends AbstractWspElement implements SchemaValidat /** 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::ANY; + public const string XS_ANY_ATTR_NAMESPACE = NS::ANY; /** @@ -94,7 +94,6 @@ public function getPolicies(): array * Convert XML into an wsp:PolicyAttachment 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 @@ -127,7 +126,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:PolicyAttachment to XML. * * @param \DOMElement|null $parent The element we should add this wsp:AppliesTo to. - * @return \DOMElement This wsp:AppliesTo element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/src/XML/wsp_200607/PolicyReference.php b/src/XML/wsp_200607/PolicyReference.php index faf810c..5d402da 100644 --- a/src/XML/wsp_200607/PolicyReference.php +++ b/src/XML/wsp_200607/PolicyReference.php @@ -28,13 +28,13 @@ final class PolicyReference extends AbstractWspElement implements SchemaValidata /** 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; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ [null, 'Digest'], [null, 'DigestAlgorithm'], [null, 'URI'], @@ -93,7 +93,6 @@ public function getDigestAlgorithm(): ?AnyURIValue * Convert XML into an wsp:PolicyReference 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 @@ -117,7 +116,6 @@ public static function fromXML(DOMElement $xml): static * Convert this wsp:PolicyReference to XML. * * @param \DOMElement|null $parent The element we should add this wsp:Policy to - * @return \DOMElement This wsp:PolicyReference element. */ public function toXML(?DOMElement $parent = null): DOMElement { diff --git a/tests/Policy/Constants.php b/tests/Policy/Constants.php index 9a1793f..f338dc2 100644 --- a/tests/Policy/Constants.php +++ b/tests/Policy/Constants.php @@ -11,5 +11,5 @@ */ class Constants extends \SimpleSAML\WebServices\Policy\Constants { - public const NAMESPACE = 'urn:x-simplesamlphp:namespace'; + public const string NAMESPACE = 'urn:x-simplesamlphp:namespace'; }