From f4aaeebd6e02157fb62fbf884694353a2faf7023 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 16 Dec 2025 19:28:31 +0100 Subject: [PATCH 1/6] typed constants --- composer.json | 2 +- src/XML/AbstractElement.php | 17 +++----------- src/XML/ArrayizableElementInterface.php | 1 - src/XML/Assert/ByteTrait.php | 1 - src/XML/Assert/DateTimeTrait.php | 2 -- src/XML/Assert/DateTrait.php | 2 -- src/XML/Assert/DayTrait.php | 2 -- src/XML/Assert/DecimalTrait.php | 1 - src/XML/Assert/DoubleTrait.php | 1 - src/XML/Assert/DurationTrait.php | 1 - src/XML/Assert/EntitiesTrait.php | 1 - src/XML/Assert/FloatTrait.php | 1 - src/XML/Assert/HexBinaryTrait.php | 1 - src/XML/Assert/IDRefsTrait.php | 1 - src/XML/Assert/IntTrait.php | 1 - src/XML/Assert/IntegerTrait.php | 1 - src/XML/Assert/LanguageTrait.php | 1 - src/XML/Assert/LongTrait.php | 1 - src/XML/Assert/MonthTrait.php | 2 -- src/XML/Assert/NCNameTrait.php | 1 - src/XML/Assert/NMTokenTrait.php | 1 - src/XML/Assert/NMTokensTrait.php | 1 - src/XML/Assert/NameTrait.php | 1 - src/XML/Assert/NegativeIntegerTrait.php | 1 - src/XML/Assert/NonNegativeIntegerTrait.php | 1 - src/XML/Assert/NonPositiveIntegerTrait.php | 1 - src/XML/Assert/PositiveIntegerTrait.php | 1 - src/XML/Assert/QNameTrait.php | 1 - src/XML/Assert/ShortTrait.php | 1 - src/XML/Assert/TimeTrait.php | 1 - src/XML/Assert/UnsignedByteTrait.php | 1 - src/XML/Assert/UnsignedIntTrait.php | 1 - src/XML/Assert/UnsignedLongTrait.php | 1 - src/XML/Assert/UnsignedShortTrait.php | 1 - src/XML/Assert/YearMonthTrait.php | 1 - src/XML/Assert/YearTrait.php | 1 - src/XML/Attribute.php | 9 -------- src/XML/Chunk.php | 19 +++------------- src/XML/Constants.php | 6 ++--- src/XML/DOMDocumentFactory.php | 9 +------- src/XML/ElementInterface.php | 2 -- src/XML/Exception/UnparseableXMLException.php | 2 +- src/XML/ExtendableElementTrait.php | 1 - src/XML/SchemaValidatableElementInterface.php | 1 - src/XML/SchemaValidatableElementTrait.php | 3 --- src/XML/SerializableElementInterface.php | 6 ----- src/XML/SerializableElementTrait.php | 5 ----- src/XML/Type/BaseValue.php | 3 +-- src/XML/Type/IDValue.php | 3 +-- src/XML/Type/LangValue.php | 3 +-- src/XML/TypedTextContentTrait.php | 22 +------------------ src/XML/Utils/Random.php | 2 +- src/XML/XML/Trait/SpecialAttrsTrait.php | 9 ++++---- src/XMLSchema/Constants.php | 4 ++-- src/XMLSchema/Type/AnyURIValue.php | 5 +---- src/XMLSchema/Type/Base64BinaryValue.php | 5 +---- src/XMLSchema/Type/BooleanValue.php | 8 +------ src/XMLSchema/Type/ByteValue.php | 4 +--- src/XMLSchema/Type/DateTimeValue.php | 11 ++-------- src/XMLSchema/Type/DateValue.php | 5 +---- src/XMLSchema/Type/DayValue.php | 5 +---- src/XMLSchema/Type/DecimalValue.php | 5 +---- src/XMLSchema/Type/DoubleValue.php | 5 +---- src/XMLSchema/Type/DurationValue.php | 5 +---- src/XMLSchema/Type/EntitiesValue.php | 4 +--- src/XMLSchema/Type/EntityValue.php | 3 +-- src/XMLSchema/Type/FloatValue.php | 5 +---- src/XMLSchema/Type/Helper/AnyURIListValue.php | 2 -- src/XMLSchema/Type/HexBinaryValue.php | 5 +---- src/XMLSchema/Type/IDRefValue.php | 3 +-- src/XMLSchema/Type/IDRefsValue.php | 4 +--- src/XMLSchema/Type/IDValue.php | 3 +-- src/XMLSchema/Type/IntValue.php | 4 +--- src/XMLSchema/Type/IntegerValue.php | 7 +----- src/XMLSchema/Type/LanguageValue.php | 4 +--- src/XMLSchema/Type/LongValue.php | 4 +--- src/XMLSchema/Type/MonthValue.php | 5 +---- src/XMLSchema/Type/NCNameValue.php | 4 +--- src/XMLSchema/Type/NMTokenValue.php | 4 +--- src/XMLSchema/Type/NMTokensValue.php | 4 +--- src/XMLSchema/Type/NameValue.php | 4 +--- src/XMLSchema/Type/NegativeIntegerValue.php | 4 +--- .../Type/NonNegativeIntegerValue.php | 4 +--- .../Type/NonPositiveIntegerValue.php | 4 +--- src/XMLSchema/Type/NormalizedStringValue.php | 4 +--- src/XMLSchema/Type/PositiveIntegerValue.php | 4 +--- src/XMLSchema/Type/QNameValue.php | 12 +--------- .../Type/Schema/AbstractAllNNIValue.php | 1 - src/XMLSchema/Type/Schema/BlockSetValue.php | 4 +--- .../Type/Schema/DerivationControlValue.php | 2 -- .../Type/Schema/DerivationSetValue.php | 4 +--- src/XMLSchema/Type/Schema/FormChoiceValue.php | 2 -- .../Type/Schema/FullDerivationSetValue.php | 4 +--- src/XMLSchema/Type/Schema/MaxOccursValue.php | 3 +-- src/XMLSchema/Type/Schema/MinOccursValue.php | 3 +-- .../Type/Schema/NamespaceListValue.php | 4 +--- .../Type/Schema/ProcessContentsValue.php | 2 -- src/XMLSchema/Type/Schema/PublicValue.php | 3 +-- .../Schema/ReducedDerivationControlValue.php | 1 - .../Type/Schema/SimpleDerivationSetValue.php | 4 +--- .../Schema/TypeDerivationControlValue.php | 1 - src/XMLSchema/Type/Schema/UseValue.php | 2 -- src/XMLSchema/Type/Schema/WhiteSpaceValue.php | 5 +---- src/XMLSchema/Type/ShortValue.php | 4 +--- src/XMLSchema/Type/StringValue.php | 3 +-- src/XMLSchema/Type/TimeValue.php | 5 +---- src/XMLSchema/Type/TokenValue.php | 4 +--- src/XMLSchema/Type/UnsignedByteValue.php | 4 +--- src/XMLSchema/Type/UnsignedIntValue.php | 4 +--- src/XMLSchema/Type/UnsignedLongValue.php | 4 +--- src/XMLSchema/Type/UnsignedShortValue.php | 4 +--- src/XMLSchema/Type/YearMonthValue.php | 5 +---- src/XMLSchema/Type/YearValue.php | 5 +---- src/XMLSchema/XML/AbstractAll.php | 2 +- src/XMLSchema/XML/AbstractAnyType.php | 4 ++-- src/XMLSchema/XML/AbstractExplicitGroup.php | 2 +- .../XML/AbstractNamedAttributeGroup.php | 2 +- src/XMLSchema/XML/AbstractNamedGroup.php | 2 +- src/XMLSchema/XML/AbstractOpenAttrs.php | 4 ++-- src/XMLSchema/XML/AbstractRealGroup.php | 2 +- .../XML/AbstractReferencedAttributeGroup.php | 2 +- src/XMLSchema/XML/AbstractReferencedGroup.php | 2 +- .../XML/AbstractSimpleExplicitGroup.php | 2 +- .../XML/AbstractTopLevelAttribute.php | 2 +- src/XMLSchema/XML/AbstractXsElement.php | 9 +++----- src/XMLSchema/XML/All.php | 3 +-- src/XMLSchema/XML/Annotation.php | 3 +-- src/XMLSchema/XML/Any.php | 3 +-- src/XMLSchema/XML/AnyAttribute.php | 3 +-- src/XMLSchema/XML/Appinfo.php | 5 ++--- src/XMLSchema/XML/Choice.php | 3 +-- src/XMLSchema/XML/ComplexContent.php | 3 +-- src/XMLSchema/XML/ComplexRestriction.php | 3 +-- src/XMLSchema/XML/Documentation.php | 7 +++--- src/XMLSchema/XML/Enumeration.php | 3 +-- src/XMLSchema/XML/Extension.php | 3 +-- src/XMLSchema/XML/Field.php | 4 +--- src/XMLSchema/XML/FractionDigits.php | 3 +-- src/XMLSchema/XML/Import.php | 3 +-- src/XMLSchema/XML/Key.php | 3 +-- src/XMLSchema/XML/Keyref.php | 3 +-- src/XMLSchema/XML/Length.php | 3 +-- src/XMLSchema/XML/LocalAttribute.php | 3 +-- src/XMLSchema/XML/LocalComplexType.php | 3 +-- src/XMLSchema/XML/LocalElement.php | 3 +-- src/XMLSchema/XML/LocalSimpleType.php | 3 +-- src/XMLSchema/XML/MaxExclusive.php | 3 +-- src/XMLSchema/XML/MaxInclusive.php | 3 +-- src/XMLSchema/XML/MaxLength.php | 3 +-- src/XMLSchema/XML/MinExclusive.php | 3 +-- src/XMLSchema/XML/MinInclusive.php | 3 +-- src/XMLSchema/XML/MinLength.php | 3 +-- src/XMLSchema/XML/NamedAttributeGroup.php | 3 +-- src/XMLSchema/XML/NamedGroup.php | 3 +-- src/XMLSchema/XML/NarrowMaxMinElement.php | 3 +-- src/XMLSchema/XML/Notation.php | 3 +-- src/XMLSchema/XML/Pattern.php | 3 +-- src/XMLSchema/XML/Redefine.php | 3 +-- .../XML/ReferencedAttributeGroup.php | 3 +-- src/XMLSchema/XML/ReferencedGroup.php | 3 +-- src/XMLSchema/XML/Restriction.php | 3 +-- src/XMLSchema/XML/Schema.php | 5 ++--- src/XMLSchema/XML/Selector.php | 4 +--- src/XMLSchema/XML/Sequence.php | 3 +-- src/XMLSchema/XML/SimpleChoice.php | 3 +-- src/XMLSchema/XML/SimpleContent.php | 3 +-- src/XMLSchema/XML/SimpleExtension.php | 3 +-- src/XMLSchema/XML/SimpleRestriction.php | 3 +-- src/XMLSchema/XML/SimpleSequence.php | 3 +-- src/XMLSchema/XML/TopLevelAttribute.php | 3 +-- src/XMLSchema/XML/TopLevelComplexType.php | 3 +-- src/XMLSchema/XML/TopLevelElement.php | 3 +-- src/XMLSchema/XML/TopLevelSimpleType.php | 3 +-- src/XMLSchema/XML/TotalDigits.php | 3 +-- src/XMLSchema/XML/Union.php | 3 +-- src/XMLSchema/XML/Unique.php | 3 +-- src/XMLSchema/XML/WhiteSpace.php | 3 +-- src/XMLSchema/XML/XsInclude.php | 3 +-- src/XMLSchema/XML/XsList.php | 3 +-- src/XPath/Constants.php | 13 +++++------ src/XPath/XPath.php | 1 - src/XPath/XPathFilter.php | 1 - tests/Helper/Base64BinaryElement.php | 12 ++++------ tests/Helper/BooleanElement.php | 12 ++++------ tests/Helper/Element.php | 6 ++--- tests/Helper/ExtendableAttributesElement.php | 17 +++++--------- tests/Helper/ExtendableElement.php | 17 +++++--------- tests/Helper/StringElement.php | 12 ++++------ tests/Helper/XMLDumper.php | 2 ++ 189 files changed, 184 insertions(+), 528 deletions(-) diff --git a/composer.json b/composer.json index c63224ae..46b0e18e 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ } }, "require": { - "php": "^8.2", + "php": "^8.3", "ext-bcmath": "*", "ext-date": "*", diff --git a/src/XML/AbstractElement.php b/src/XML/AbstractElement.php index a3f634d4..9c1f33d9 100644 --- a/src/XML/AbstractElement.php +++ b/src/XML/AbstractElement.php @@ -25,7 +25,9 @@ * * @package simplesamlphp/xml-common */ -abstract class AbstractElement implements SerializableElementInterface +abstract class AbstractElement implements + SerializableElementInterface, + ElementInterface { use SerializableElementTrait; @@ -34,7 +36,6 @@ abstract class AbstractElement implements SerializableElementInterface * Create a document structure for this element * * @param \DOMElement|null $parent The element we should append to. - * @return \DOMElement */ public function instantiateParentElement(?DOMElement $parent = null): DOMElement { @@ -117,7 +118,6 @@ public static function getOptionalAttribute( * Static method that processes a fully namespaced class name and returns the name of the class from it. * * @param string $class - * @return string */ public static function getClassName(string $class): string { @@ -129,8 +129,6 @@ public static function getClassName(string $class): string /** * Get the XML qualified name (prefix:name) of the element represented by this class. - * - * @return string */ public function getQualifiedName(): string { @@ -166,8 +164,6 @@ public static function getChildrenOfClass(DOMElement $parent): array /** * Get the namespace for the element. - * - * @return string|null */ public static function getNamespaceURI(): ?string { @@ -187,8 +183,6 @@ public static function getNamespaceURI(): ?string /** * Get the namespace-prefix for the element. - * - * @return string */ public static function getNamespacePrefix(): string { @@ -206,8 +200,6 @@ public static function getNamespacePrefix(): string /** * Get the local name for the element. - * - * @return string */ public static function getLocalName(): string { @@ -224,8 +216,6 @@ public static function getLocalName(): string /** * Whether the element may be normalized. - * - * @return bool */ public static function getNormalization(): bool { @@ -244,7 +234,6 @@ public static function getNormalization(): bool * Test if an object, at the state it's in, would produce an empty XML-element * * @codeCoverageIgnore - * @return bool */ public function isEmptyElement(): bool { diff --git a/src/XML/ArrayizableElementInterface.php b/src/XML/ArrayizableElementInterface.php index e107a2ea..c6aef790 100644 --- a/src/XML/ArrayizableElementInterface.php +++ b/src/XML/ArrayizableElementInterface.php @@ -15,7 +15,6 @@ interface ArrayizableElementInterface * Create a class from an array * * @param array $data - * @return static */ public static function fromArray(array $data): static; diff --git a/src/XML/Assert/ByteTrait.php b/src/XML/Assert/ByteTrait.php index 2d7c1ec5..12fd3d91 100644 --- a/src/XML/Assert/ByteTrait.php +++ b/src/XML/Assert/ByteTrait.php @@ -11,7 +11,6 @@ */ trait ByteTrait { - /** @var string */ private static string $byte_regex = '/^ ( ( diff --git a/src/XML/Assert/DateTimeTrait.php b/src/XML/Assert/DateTimeTrait.php index d540b083..9950864a 100644 --- a/src/XML/Assert/DateTimeTrait.php +++ b/src/XML/Assert/DateTimeTrait.php @@ -30,8 +30,6 @@ trait DateTimeTrait * * ss is a two-integer-digit numeral that represents the whole seconds; * * '.' s+ (if present) represents the fractional seconds; * * zzzzzz (if present) represents the timezone (as described below). - * - * @var string */ private static string $datetime_regex = '/^ -? diff --git a/src/XML/Assert/DateTrait.php b/src/XML/Assert/DateTrait.php index 527c3cce..a6e41e38 100644 --- a/src/XML/Assert/DateTrait.php +++ b/src/XML/Assert/DateTrait.php @@ -21,8 +21,6 @@ trait DateTrait * * and the least upper bound of the interval is the timeline point represented (noncanonically) by: * '-' yyyy '-' mm '-' dd 'T24:00:00' zzzzzz?. - * - * @var string */ private static string $date_regex = '/^ -? diff --git a/src/XML/Assert/DayTrait.php b/src/XML/Assert/DayTrait.php index e7f1a588..f91f3f30 100644 --- a/src/XML/Assert/DayTrait.php +++ b/src/XML/Assert/DayTrait.php @@ -13,8 +13,6 @@ trait DayTrait { /** * Format: ---DD with optional timezone representation - * - * @var string */ private static string $day_regex = '/^ --- diff --git a/src/XML/Assert/DecimalTrait.php b/src/XML/Assert/DecimalTrait.php index 10935767..6b1b5363 100644 --- a/src/XML/Assert/DecimalTrait.php +++ b/src/XML/Assert/DecimalTrait.php @@ -11,7 +11,6 @@ */ trait DecimalTrait { - /** @var string */ private static string $decimal_regex = '/^[+-]?((\d+(\.\d*)?)|(\.\d+))$/D'; diff --git a/src/XML/Assert/DoubleTrait.php b/src/XML/Assert/DoubleTrait.php index e090816b..faab1223 100644 --- a/src/XML/Assert/DoubleTrait.php +++ b/src/XML/Assert/DoubleTrait.php @@ -11,7 +11,6 @@ */ trait DoubleTrait { - /** @var string */ private static string $double_regex = '/^ ( ([+-]?([0-9]+[.][0-9]*|[.][0-9]+)([e][+-]?[0-9]+)?) diff --git a/src/XML/Assert/DurationTrait.php b/src/XML/Assert/DurationTrait.php index ecbba930..f5652290 100644 --- a/src/XML/Assert/DurationTrait.php +++ b/src/XML/Assert/DurationTrait.php @@ -11,7 +11,6 @@ */ trait DurationTrait { - /** @var string */ private static string $duration_regex = '/^ ([-+]?) P diff --git a/src/XML/Assert/EntitiesTrait.php b/src/XML/Assert/EntitiesTrait.php index 9e3527d9..d10f8070 100644 --- a/src/XML/Assert/EntitiesTrait.php +++ b/src/XML/Assert/EntitiesTrait.php @@ -11,7 +11,6 @@ */ trait EntitiesTrait { - /** @var string */ private static string $entities_regex = '/^([a-z_][\w.-]*)([\s][a-z_][\w.-]*)*$/Dui'; diff --git a/src/XML/Assert/FloatTrait.php b/src/XML/Assert/FloatTrait.php index c3d4156f..b3d674be 100644 --- a/src/XML/Assert/FloatTrait.php +++ b/src/XML/Assert/FloatTrait.php @@ -11,7 +11,6 @@ */ trait FloatTrait { - /** @var string */ private static string $float_regex = '/^(([+-]?([0-9]+[.][0-9]*|[.][0-9]+)([e][+-]?[0-9]+)?)|NaN|[-]?FIN)$/D'; diff --git a/src/XML/Assert/HexBinaryTrait.php b/src/XML/Assert/HexBinaryTrait.php index 6d7bf1bd..baab52b5 100644 --- a/src/XML/Assert/HexBinaryTrait.php +++ b/src/XML/Assert/HexBinaryTrait.php @@ -11,7 +11,6 @@ */ trait HexBinaryTrait { - /** @var string */ private static string $hexbin_regex = '/^([0-9a-f]{2})+$/Di'; diff --git a/src/XML/Assert/IDRefsTrait.php b/src/XML/Assert/IDRefsTrait.php index 72607ebb..965c042e 100644 --- a/src/XML/Assert/IDRefsTrait.php +++ b/src/XML/Assert/IDRefsTrait.php @@ -11,7 +11,6 @@ */ trait IDRefsTrait { - /** @var string */ private static string $idrefs_regex = '/^([a-z_][\w.-]*)([\s][a-z_][\w.-]*)*$/Dui'; diff --git a/src/XML/Assert/IntTrait.php b/src/XML/Assert/IntTrait.php index 2d2cbad8..da9c8ced 100644 --- a/src/XML/Assert/IntTrait.php +++ b/src/XML/Assert/IntTrait.php @@ -11,7 +11,6 @@ */ trait IntTrait { - /** @var string */ private static string $int_regex = '/^ ( ( diff --git a/src/XML/Assert/IntegerTrait.php b/src/XML/Assert/IntegerTrait.php index 8ea940f1..87314162 100644 --- a/src/XML/Assert/IntegerTrait.php +++ b/src/XML/Assert/IntegerTrait.php @@ -11,7 +11,6 @@ */ trait IntegerTrait { - /** @var string */ private static string $integer_regex = '/^[+-]?(\d+)$/D'; diff --git a/src/XML/Assert/LanguageTrait.php b/src/XML/Assert/LanguageTrait.php index ac2c2fc5..487e8b95 100644 --- a/src/XML/Assert/LanguageTrait.php +++ b/src/XML/Assert/LanguageTrait.php @@ -11,7 +11,6 @@ */ trait LanguageTrait { - /** @var string */ private static string $language_regex = '/^([a-z]{2}|[i]-[a-z]+|[x]-[a-z]{1,8})(-[a-z]{1,8})*$/Di'; diff --git a/src/XML/Assert/LongTrait.php b/src/XML/Assert/LongTrait.php index baeab0ee..ca177129 100644 --- a/src/XML/Assert/LongTrait.php +++ b/src/XML/Assert/LongTrait.php @@ -11,7 +11,6 @@ */ trait LongTrait { - /** @var string */ private static string $long_regex = '/^ ( ([-+]?[0]*)? diff --git a/src/XML/Assert/MonthTrait.php b/src/XML/Assert/MonthTrait.php index 696ca411..5ccf9012 100644 --- a/src/XML/Assert/MonthTrait.php +++ b/src/XML/Assert/MonthTrait.php @@ -13,8 +13,6 @@ trait MonthTrait { /** * Format --MM with optional timezone representation - * - * @var string */ private static string $month_regex = '/^--(0[1-9]|1[012])((\+|-)([0-1][0-9]|2[0-4]):(0[0-9]|[1-5][0-9])|Z)?$/D'; diff --git a/src/XML/Assert/NCNameTrait.php b/src/XML/Assert/NCNameTrait.php index 63d287bb..d8243b4c 100644 --- a/src/XML/Assert/NCNameTrait.php +++ b/src/XML/Assert/NCNameTrait.php @@ -11,7 +11,6 @@ */ trait NCNameTrait { - /** @var string */ private static string $ncname_regex = '/^[a-z_][\w.-]*$/Dui'; diff --git a/src/XML/Assert/NMTokenTrait.php b/src/XML/Assert/NMTokenTrait.php index 12919d01..589c891c 100644 --- a/src/XML/Assert/NMTokenTrait.php +++ b/src/XML/Assert/NMTokenTrait.php @@ -11,7 +11,6 @@ */ trait NMTokenTrait { - /** @var string */ private static string $nmtoken_regex = '/^[\w.:-]+$/Du'; diff --git a/src/XML/Assert/NMTokensTrait.php b/src/XML/Assert/NMTokensTrait.php index f187e660..a002d60c 100644 --- a/src/XML/Assert/NMTokensTrait.php +++ b/src/XML/Assert/NMTokensTrait.php @@ -11,7 +11,6 @@ */ trait NMTokensTrait { - /** @var string */ private static string $nmtokens_regex = '/^([\w.:-]+)([\s][\w.:-]+)*$/Du'; diff --git a/src/XML/Assert/NameTrait.php b/src/XML/Assert/NameTrait.php index fc825c31..3a92df8d 100644 --- a/src/XML/Assert/NameTrait.php +++ b/src/XML/Assert/NameTrait.php @@ -11,7 +11,6 @@ */ trait NameTrait { - /** @var string */ private static string $name_regex = '/^[a-z:-][\w.:-]+$/Dui'; diff --git a/src/XML/Assert/NegativeIntegerTrait.php b/src/XML/Assert/NegativeIntegerTrait.php index 61baf0fb..dab583a8 100644 --- a/src/XML/Assert/NegativeIntegerTrait.php +++ b/src/XML/Assert/NegativeIntegerTrait.php @@ -11,7 +11,6 @@ */ trait NegativeIntegerTrait { - /** @var string */ private static string $negativeInteger_regex = '/^(-\d+)$/D'; diff --git a/src/XML/Assert/NonNegativeIntegerTrait.php b/src/XML/Assert/NonNegativeIntegerTrait.php index 83ec58ea..6763c61f 100644 --- a/src/XML/Assert/NonNegativeIntegerTrait.php +++ b/src/XML/Assert/NonNegativeIntegerTrait.php @@ -11,7 +11,6 @@ */ trait NonNegativeIntegerTrait { - /** @var string */ private static string $nonNegativeInteger_regex = '/^([+]?\d+)$/D'; diff --git a/src/XML/Assert/NonPositiveIntegerTrait.php b/src/XML/Assert/NonPositiveIntegerTrait.php index 60c9f921..488c2936 100644 --- a/src/XML/Assert/NonPositiveIntegerTrait.php +++ b/src/XML/Assert/NonPositiveIntegerTrait.php @@ -11,7 +11,6 @@ */ trait NonPositiveIntegerTrait { - /** @var string */ private static string $nonPositiveInteger_regex = '/^(-\d+|0)$/D'; diff --git a/src/XML/Assert/PositiveIntegerTrait.php b/src/XML/Assert/PositiveIntegerTrait.php index dc7ebf54..d376fdcd 100644 --- a/src/XML/Assert/PositiveIntegerTrait.php +++ b/src/XML/Assert/PositiveIntegerTrait.php @@ -11,7 +11,6 @@ */ trait PositiveIntegerTrait { - /** @var string */ private static string $positiveInteger_regex = '/^([+]?0*)([1-9]\d*$)$/D'; diff --git a/src/XML/Assert/QNameTrait.php b/src/XML/Assert/QNameTrait.php index 1717fc46..990feafd 100644 --- a/src/XML/Assert/QNameTrait.php +++ b/src/XML/Assert/QNameTrait.php @@ -11,7 +11,6 @@ */ trait QNameTrait { - /** @var string */ private static string $qname_regex = '/^([a-z_][\w.-]*)(:[a-z_][\w.-]*)?$/Di'; diff --git a/src/XML/Assert/ShortTrait.php b/src/XML/Assert/ShortTrait.php index f506e122..7afefd77 100644 --- a/src/XML/Assert/ShortTrait.php +++ b/src/XML/Assert/ShortTrait.php @@ -11,7 +11,6 @@ */ trait ShortTrait { - /** @var string */ private static string $short_regex = '/^ ( ( diff --git a/src/XML/Assert/TimeTrait.php b/src/XML/Assert/TimeTrait.php index b447565b..a1d93a6b 100644 --- a/src/XML/Assert/TimeTrait.php +++ b/src/XML/Assert/TimeTrait.php @@ -11,7 +11,6 @@ */ trait TimeTrait { - /** @var string */ private static string $time_regex = '/^ ([0-1][0-9]|2[0-4]) : diff --git a/src/XML/Assert/UnsignedByteTrait.php b/src/XML/Assert/UnsignedByteTrait.php index 25ba5241..e0e71ff8 100644 --- a/src/XML/Assert/UnsignedByteTrait.php +++ b/src/XML/Assert/UnsignedByteTrait.php @@ -11,7 +11,6 @@ */ trait UnsignedByteTrait { - /** @var string */ private static string $unsignedByte_regex = '/^(([+]?0*)(?:[1-9]|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])|0)$/D'; diff --git a/src/XML/Assert/UnsignedIntTrait.php b/src/XML/Assert/UnsignedIntTrait.php index fc9613ad..8e7c96cc 100644 --- a/src/XML/Assert/UnsignedIntTrait.php +++ b/src/XML/Assert/UnsignedIntTrait.php @@ -11,7 +11,6 @@ */ trait UnsignedIntTrait { - /** @var string */ private static string $unsignedInt_regex = '/^ ( ([+]?0*) diff --git a/src/XML/Assert/UnsignedLongTrait.php b/src/XML/Assert/UnsignedLongTrait.php index 9051bbd5..6c7da2d9 100644 --- a/src/XML/Assert/UnsignedLongTrait.php +++ b/src/XML/Assert/UnsignedLongTrait.php @@ -11,7 +11,6 @@ */ trait UnsignedLongTrait { - /** @var string */ private static string $unsignedLong_regex = '/^ (?: ([+]?[0]*) diff --git a/src/XML/Assert/UnsignedShortTrait.php b/src/XML/Assert/UnsignedShortTrait.php index 0fa9b1d4..14a1ed9e 100644 --- a/src/XML/Assert/UnsignedShortTrait.php +++ b/src/XML/Assert/UnsignedShortTrait.php @@ -11,7 +11,6 @@ */ trait UnsignedShortTrait { - /** @var string */ private static string $unsignedShort_regex = '/^ ( ([+]?0*) diff --git a/src/XML/Assert/YearMonthTrait.php b/src/XML/Assert/YearMonthTrait.php index a13faf2f..bc44c17d 100644 --- a/src/XML/Assert/YearMonthTrait.php +++ b/src/XML/Assert/YearMonthTrait.php @@ -11,7 +11,6 @@ */ trait YearMonthTrait { - /** @var string */ private static string $yearmonth_regex = '/^ -? ([1-9][0-9]*|[0-9]{4}) diff --git a/src/XML/Assert/YearTrait.php b/src/XML/Assert/YearTrait.php index f78f5cb1..77b04763 100644 --- a/src/XML/Assert/YearTrait.php +++ b/src/XML/Assert/YearTrait.php @@ -11,7 +11,6 @@ */ trait YearTrait { - /** @var string */ private static string $year_regex = '/^ -? ([1-9][0-9]*|[0-9]{4}) diff --git a/src/XML/Attribute.php b/src/XML/Attribute.php index 9d0fd964..c8642177 100644 --- a/src/XML/Attribute.php +++ b/src/XML/Attribute.php @@ -44,8 +44,6 @@ public function __construct( /** * Collect the value of the namespaceURI-property - * - * @return string|null */ public function getNamespaceURI(): ?string { @@ -55,8 +53,6 @@ public function getNamespaceURI(): ?string /** * Collect the value of the namespacePrefix-property - * - * @return string|null */ public function getNamespacePrefix(): ?string { @@ -66,8 +62,6 @@ public function getNamespacePrefix(): ?string /** * Collect the value of the localName-property - * - * @return string */ public function getAttrName(): string { @@ -90,7 +84,6 @@ public function getAttrValue(): ValueTypeInterface * Create a class from XML * * @param \DOMAttr $attr - * @return static */ public static function fromXML(DOMAttr $attr): static { @@ -102,7 +95,6 @@ public static function fromXML(DOMAttr $attr): static * Create XML from this class * * @param \DOMElement $parent - * @return \DOMElement */ public function toXML(DOMElement $parent): DOMElement { @@ -135,7 +127,6 @@ public function toXML(DOMElement $parent): DOMElement * attrName: string, * attrValue: \SimpleSAML\XMLSchema\Type\Interface\ValueTypeInterface, * } $data - * @return static */ public static function fromArray(array $data): static { diff --git a/src/XML/Chunk.php b/src/XML/Chunk.php index 4ff6fb91..dc953fdc 100644 --- a/src/XML/Chunk.php +++ b/src/XML/Chunk.php @@ -18,7 +18,9 @@ * * @package simplesamlphp/xml-common */ -final class Chunk implements SerializableElementInterface +final class Chunk implements + SerializableElementInterface, + ElementInterface { use SerializableElementTrait; @@ -68,8 +70,6 @@ public function __construct( /** * Collect the value of the normalization-property - * - * @return bool */ public function getNormalization(): bool { @@ -90,8 +90,6 @@ public function setNormalization(bool $normalization): void /** * Collect the value of the localName-property - * - * @return string */ public function getLocalName(): string { @@ -114,8 +112,6 @@ public function setLocalName(string $localName): void /** * Collect the value of the namespaceURI-property - * - * @return string|null */ public function getNamespaceURI(): ?string { @@ -137,8 +133,6 @@ protected function setNamespaceURI(?string $namespaceURI = null): void /** * Get this \DOMElement. - * - * @return \DOMElement This element. */ public function getXML(): DOMElement { @@ -148,8 +142,6 @@ public function getXML(): DOMElement /** * Collect the value of the prefix-property - * - * @return string */ public function getPrefix(): string { @@ -171,8 +163,6 @@ protected function setPrefix(?string $prefix = null): void /** * Get the XML qualified name (prefix:name, or just name when not prefixed) * of the element represented by this class. - * - * @return string */ public function getQualifiedName(): string { @@ -242,8 +232,6 @@ public static function getOptionalAttribute( /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool { @@ -255,7 +243,6 @@ public function isEmptyElement(): bool /** * @param \DOMElement $xml - * @return static */ public static function fromXML(DOMElement $xml): static { diff --git a/src/XML/Constants.php b/src/XML/Constants.php index 6903702c..df5a8fb1 100644 --- a/src/XML/Constants.php +++ b/src/XML/Constants.php @@ -14,16 +14,16 @@ class Constants /** * The namespace for XML. */ - public const NS_XML = 'http://www.w3.org/XML/1998/namespace'; + public const string NS_XML = 'http://www.w3.org/XML/1998/namespace'; /** * The namespace for XMLNS declarations. */ - public const NS_XMLNS = 'http://www.w3.org/2000/xmlns/'; + public const string NS_XMLNS = 'http://www.w3.org/2000/xmlns/'; /** * The maximum amount of child nodes this library is willing to handle. * By specification, this limit is 150K, but that opens up for denial of service. */ - public const UNBOUNDED_LIMIT = 10000; + public const int UNBOUNDED_LIMIT = 10000; } diff --git a/src/XML/DOMDocumentFactory.php b/src/XML/DOMDocumentFactory.php index a270ded0..e79d6d0c 100644 --- a/src/XML/DOMDocumentFactory.php +++ b/src/XML/DOMDocumentFactory.php @@ -29,14 +29,12 @@ final class DOMDocumentFactory * @var non-negative-int * TODO: Add LIBXML_NO_XXE to the defaults when PHP 8.4.0 + libxml 2.13.0 become generally available */ - public const DEFAULT_OPTIONS = \LIBXML_COMPACT | \LIBXML_NONET | \LIBXML_NSCLEAN; + public const int DEFAULT_OPTIONS = \LIBXML_COMPACT | \LIBXML_NONET | \LIBXML_NSCLEAN; /** * @param string $xml * @param non-negative-int $options - * - * @return \DOMDocument */ public static function fromString( string $xml, @@ -88,8 +86,6 @@ public static function fromString( /** * @param string $file * @param non-negative-int $options - * - * @return \DOMDocument */ public static function fromFile( string $file, @@ -112,7 +108,6 @@ public static function fromFile( /** * @param string $version * @param string $encoding - * @return \DOMDocument */ public static function create(string $version = '1.0', string $encoding = 'UTF-8'): DOMDocument { @@ -122,7 +117,6 @@ public static function create(string $version = '1.0', string $encoding = 'UTF-8 /** * @param \DOMDocument $doc - * @return \DOMDocument */ public static function normalizeDocument(DOMDocument $doc): DOMDocument { @@ -175,7 +169,6 @@ public static function normalizeDocument(DOMDocument $doc): DOMDocument /** * @param \DOMElement $elt * @param string $prefix - * @return string|null */ public static function lookupNamespaceURI(DOMElement $elt, string $prefix): ?string { diff --git a/src/XML/ElementInterface.php b/src/XML/ElementInterface.php index 7ebf5fc1..fff6287c 100644 --- a/src/XML/ElementInterface.php +++ b/src/XML/ElementInterface.php @@ -17,8 +17,6 @@ interface ElementInterface { /** * Get the XML qualified name (prefix:name) of the element represented by this class. - * - * @return string */ public function getQualifiedName(): string; diff --git a/src/XML/Exception/UnparseableXMLException.php b/src/XML/Exception/UnparseableXMLException.php index 488a4150..37325a11 100644 --- a/src/XML/Exception/UnparseableXMLException.php +++ b/src/XML/Exception/UnparseableXMLException.php @@ -13,7 +13,7 @@ final class UnparseableXMLException extends RuntimeException { /** @var string[] */ - private const LEVELMAP = [ + private const array LEVELMAP = [ LIBXML_ERR_WARNING => 'WARNING', LIBXML_ERR_ERROR => 'ERROR', LIBXML_ERR_FATAL => 'FATAL', diff --git a/src/XML/ExtendableElementTrait.php b/src/XML/ExtendableElementTrait.php index 78fba537..d5965d2b 100644 --- a/src/XML/ExtendableElementTrait.php +++ b/src/XML/ExtendableElementTrait.php @@ -110,7 +110,6 @@ protected static function getChildElementsFromXML( * Set an array with all elements present. * * @param \SimpleSAML\XML\SerializableElementInterface[] $elements - * @return void */ protected function setElements(array $elements): void { diff --git a/src/XML/SchemaValidatableElementInterface.php b/src/XML/SchemaValidatableElementInterface.php index 9c008296..c2088437 100644 --- a/src/XML/SchemaValidatableElementInterface.php +++ b/src/XML/SchemaValidatableElementInterface.php @@ -18,7 +18,6 @@ interface SchemaValidatableElementInterface extends ElementInterface * * @param \DOMDocument $document * @param string|null $schemaFile - * @return \DOMDocument * * @throws \SimpleSAML\XML\Exception\IOException * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException diff --git a/src/XML/SchemaValidatableElementTrait.php b/src/XML/SchemaValidatableElementTrait.php index a16fef4d..775ea5fa 100644 --- a/src/XML/SchemaValidatableElementTrait.php +++ b/src/XML/SchemaValidatableElementTrait.php @@ -32,7 +32,6 @@ trait SchemaValidatableElementTrait * * @param \DOMDocument $document * @param string|null $schemaFile - * @return \DOMDocument * * @throws \SimpleSAML\XML\Exception\IOException * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException @@ -71,8 +70,6 @@ public static function schemaValidate(DOMDocument $document, ?string $schemaFile /** * Get the schema file that can validate this element. * The path must be relative to the project's base directory. - * - * @return string */ public static function getSchemaFile(): string { diff --git a/src/XML/SerializableElementInterface.php b/src/XML/SerializableElementInterface.php index 527240ff..314f9125 100644 --- a/src/XML/SerializableElementInterface.php +++ b/src/XML/SerializableElementInterface.php @@ -15,16 +15,12 @@ interface SerializableElementInterface extends ElementInterface { /** * Output the class as an XML-formatted string - * - * @return string */ public function __toString(): string; /** * Test if an object, at the state it's in, would produce an empty XML-element - * - * @return bool */ public function isEmptyElement(): bool; @@ -33,7 +29,6 @@ public function isEmptyElement(): bool; * Create a class from XML * * @param \DOMElement $xml - * @return static */ public static function fromXML(DOMElement $xml): static; @@ -42,7 +37,6 @@ public static function fromXML(DOMElement $xml): static; * Create XML from this class * * @param \DOMElement|null $parent - * @return \DOMElement */ public function toXML(?DOMElement $parent = null): DOMElement; } diff --git a/src/XML/SerializableElementTrait.php b/src/XML/SerializableElementTrait.php index bc5a3179..68467685 100644 --- a/src/XML/SerializableElementTrait.php +++ b/src/XML/SerializableElementTrait.php @@ -21,16 +21,12 @@ trait SerializableElementTrait * Whether to format the string output of this element or not. * * Defaults to true. Override to disable output formatting. - * - * @var bool */ protected bool $formatOutput = true; /** * Output the class as an XML-formatted string - * - * @return string */ public function __toString(): string { @@ -91,7 +87,6 @@ public function __unserialize(array $serialized): void * Create XML from this class * * @param \DOMElement|null $parent - * @return \DOMElement */ abstract public function toXML(?DOMElement $parent = null): DOMElement; } diff --git a/src/XML/Type/BaseValue.php b/src/XML/Type/BaseValue.php index 706a572d..970c50ae 100644 --- a/src/XML/Type/BaseValue.php +++ b/src/XML/Type/BaseValue.php @@ -14,8 +14,7 @@ */ class BaseValue extends AnyURIValue implements AttributeTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'xs:anyURI'; + public const string SCHEMA_TYPE = 'xs:anyURI'; /** diff --git a/src/XML/Type/IDValue.php b/src/XML/Type/IDValue.php index 67669d52..8544f43d 100644 --- a/src/XML/Type/IDValue.php +++ b/src/XML/Type/IDValue.php @@ -14,8 +14,7 @@ */ class IDValue extends BaseIDValue implements AttributeTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'xs:ID'; + public const string SCHEMA_TYPE = 'xs:ID'; /** diff --git a/src/XML/Type/LangValue.php b/src/XML/Type/LangValue.php index 7fc13e7c..7ab8c06e 100644 --- a/src/XML/Type/LangValue.php +++ b/src/XML/Type/LangValue.php @@ -14,8 +14,7 @@ */ class LangValue extends LanguageValue implements AttributeTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'xs:language'; + public const string SCHEMA_TYPE = 'xs:language'; /** diff --git a/src/XML/TypedTextContentTrait.php b/src/XML/TypedTextContentTrait.php index 3da5d699..76251a63 100644 --- a/src/XML/TypedTextContentTrait.php +++ b/src/XML/TypedTextContentTrait.php @@ -23,29 +23,12 @@ */ trait TypedTextContentTrait { - /** @var \SimpleSAML\XMLSchema\Type\Interface\ValueTypeInterface $content */ - protected ValueTypeInterface $content; - - /** * @param \SimpleSAML\XMLSchema\Type\Interface\ValueTypeInterface $content */ public function __construct( - ValueTypeInterface $content, + protected readonly ValueTypeInterface $content, ) { - $this->setContent($content); - } - - - /** - * Set the content of the element. - * - * @param \SimpleSAML\XMLSchema\Type\Interface\ValueTypeInterface $content The value to go in the XML textContent - */ - protected function setContent(ValueTypeInterface $content): void - { - Assert::isAOf($content, self::getTextContentType(), InvalidValueTypeException::class); - $this->content = $content; } @@ -64,7 +47,6 @@ public function getContent(): ValueTypeInterface * Create a class from XML * * @param \DOMElement $xml - * @return static */ public static function fromXML(DOMElement $xml): static { @@ -87,7 +69,6 @@ public static function fromXML(DOMElement $xml): static * Create XML from this class * * @param \DOMElement|null $parent - * @return \DOMElement */ public function toXML(?DOMElement $parent = null): DOMElement { @@ -130,7 +111,6 @@ public static function getTextContentType(): string * Create a document structure for this element * * @param \DOMElement|null $parent The element we should append to. - * @return \DOMElement */ abstract public function instantiateParentElement(?DOMElement $parent = null): DOMElement; } diff --git a/src/XML/Utils/Random.php b/src/XML/Utils/Random.php index 95ad385a..b3ad927c 100644 --- a/src/XML/Utils/Random.php +++ b/src/XML/Utils/Random.php @@ -15,7 +15,7 @@ class Random /** * The fixed length of random identifiers. */ - public const ID_LENGTH = 43; + public const int ID_LENGTH = 43; /** diff --git a/src/XML/XML/Trait/SpecialAttrsTrait.php b/src/XML/XML/Trait/SpecialAttrsTrait.php index b082ddb3..cc2469fa 100644 --- a/src/XML/XML/Trait/SpecialAttrsTrait.php +++ b/src/XML/XML/Trait/SpecialAttrsTrait.php @@ -13,6 +13,7 @@ * Trait grouping common functionality for elements that use the specialAttrs-attributeGroup. * * @package simplesamlphp/xml-common + * * @phpstan-ignore trait.unused */ trait SpecialAttrsTrait @@ -22,28 +23,28 @@ trait SpecialAttrsTrait * * @var \SimpleSAML\XML\Type\BaseValue|null */ - protected ?BaseValue $base = null; + protected readonly ?BaseValue $base = null; /** * The id. * * @var \SimpleSAML\XML\Type\IDValue|null */ - protected ?IDValue $id = null; + protected readonly ?IDValue $id = null; /** * The lang. * * @var \SimpleSAML\XML\Type\LangValue|null */ - protected ?LangValue $lang = null; + protected readonly ?LangValue $lang = null; /** * The space. * * @var \SimpleSAML\XML\Type\SpaceValue|null */ - protected ?SpaceValue $space = null; + protected readonly ?SpaceValue $space = null; /** diff --git a/src/XMLSchema/Constants.php b/src/XMLSchema/Constants.php index 860f7c8a..9dc72860 100644 --- a/src/XMLSchema/Constants.php +++ b/src/XMLSchema/Constants.php @@ -14,10 +14,10 @@ class Constants /** * The namespace for XML schema. */ - public const NS_XS = 'http://www.w3.org/2001/XMLSchema'; + public const string NS_XS = 'http://www.w3.org/2001/XMLSchema'; /** * The namespace for XML schema instance. */ - public const NS_XSI = 'http://www.w3.org/2001/XMLSchema-instance'; + public const string NS_XSI = 'http://www.w3.org/2001/XMLSchema-instance'; } diff --git a/src/XMLSchema/Type/AnyURIValue.php b/src/XMLSchema/Type/AnyURIValue.php index 1f8fe724..c2be2ee6 100644 --- a/src/XMLSchema/Type/AnyURIValue.php +++ b/src/XMLSchema/Type/AnyURIValue.php @@ -13,15 +13,13 @@ */ class AnyURIValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'anyURI'; + public const string SCHEMA_TYPE = 'anyURI'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Base64BinaryValue.php b/src/XMLSchema/Type/Base64BinaryValue.php index 54952d2a..a3d9f356 100644 --- a/src/XMLSchema/Type/Base64BinaryValue.php +++ b/src/XMLSchema/Type/Base64BinaryValue.php @@ -15,15 +15,13 @@ */ class Base64BinaryValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'base64Binary'; + public const string SCHEMA_TYPE = 'base64Binary'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -36,7 +34,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/BooleanValue.php b/src/XMLSchema/Type/BooleanValue.php index 84357b6e..bfe935f3 100644 --- a/src/XMLSchema/Type/BooleanValue.php +++ b/src/XMLSchema/Type/BooleanValue.php @@ -16,15 +16,13 @@ */ class BooleanValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'boolean'; + public const string SCHEMA_TYPE = 'boolean'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -37,7 +35,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -47,8 +44,6 @@ protected function validateValue(string $value): void /** - * @param boolean $value - * @return static */ public static function fromBoolean(bool $value): static { @@ -59,7 +54,6 @@ public static function fromBoolean(bool $value): static /** - * @return boolean $value */ public function toBoolean(): bool { diff --git a/src/XMLSchema/Type/ByteValue.php b/src/XMLSchema/Type/ByteValue.php index f7f5c5ab..198d981e 100644 --- a/src/XMLSchema/Type/ByteValue.php +++ b/src/XMLSchema/Type/ByteValue.php @@ -12,8 +12,7 @@ */ class ByteValue extends LongValue { - /** @var string */ - public const SCHEMA_TYPE = 'byte'; + public const string SCHEMA_TYPE = 'byte'; /** @@ -21,7 +20,6 @@ class ByteValue extends LongValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/DateTimeValue.php b/src/XMLSchema/Type/DateTimeValue.php index 99ebb83f..06080cbc 100644 --- a/src/XMLSchema/Type/DateTimeValue.php +++ b/src/XMLSchema/Type/DateTimeValue.php @@ -16,18 +16,15 @@ */ class DateTimeValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'dateTime'; + public const string SCHEMA_TYPE = 'dateTime'; - /** @var string */ - public const DATETIME_FORMAT = 'Y-m-d\\TH:i:sP'; + public const string DATETIME_FORMAT = 'Y-m-d\\TH:i:sP'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -40,7 +37,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -49,7 +45,6 @@ protected function validateValue(string $value): void /** - * @return static */ public static function now(ClockInterface $clock): static { @@ -59,7 +54,6 @@ public static function now(ClockInterface $clock): static /** * @param \DateTimeInterface $value - * @return static */ public static function fromDateTime(DateTimeInterface $value): static { @@ -68,7 +62,6 @@ public static function fromDateTime(DateTimeInterface $value): static /** - * @return \DateTimeImmutable */ public function toDateTime(): DateTimeImmutable { diff --git a/src/XMLSchema/Type/DateValue.php b/src/XMLSchema/Type/DateValue.php index cf753157..4062766c 100644 --- a/src/XMLSchema/Type/DateValue.php +++ b/src/XMLSchema/Type/DateValue.php @@ -13,15 +13,13 @@ */ class DateValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'date'; + public const string SCHEMA_TYPE = 'date'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/DayValue.php b/src/XMLSchema/Type/DayValue.php index 35a7716d..0e7f4604 100644 --- a/src/XMLSchema/Type/DayValue.php +++ b/src/XMLSchema/Type/DayValue.php @@ -13,15 +13,13 @@ */ class DayValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'gDay'; + public const string SCHEMA_TYPE = 'gDay'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/DecimalValue.php b/src/XMLSchema/Type/DecimalValue.php index fe667cac..284919fb 100644 --- a/src/XMLSchema/Type/DecimalValue.php +++ b/src/XMLSchema/Type/DecimalValue.php @@ -13,15 +13,13 @@ */ class DecimalValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'decimal'; + public const string SCHEMA_TYPE = 'decimal'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/DoubleValue.php b/src/XMLSchema/Type/DoubleValue.php index d57754cd..549cc49f 100644 --- a/src/XMLSchema/Type/DoubleValue.php +++ b/src/XMLSchema/Type/DoubleValue.php @@ -13,15 +13,13 @@ */ class DoubleValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'double'; + public const string SCHEMA_TYPE = 'double'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/DurationValue.php b/src/XMLSchema/Type/DurationValue.php index 3496e36b..acaea5cb 100644 --- a/src/XMLSchema/Type/DurationValue.php +++ b/src/XMLSchema/Type/DurationValue.php @@ -13,15 +13,13 @@ */ class DurationValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'duration'; + public const string SCHEMA_TYPE = 'duration'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/EntitiesValue.php b/src/XMLSchema/Type/EntitiesValue.php index f1298377..32870b52 100644 --- a/src/XMLSchema/Type/EntitiesValue.php +++ b/src/XMLSchema/Type/EntitiesValue.php @@ -14,8 +14,7 @@ */ class EntitiesValue extends TokenValue implements ListTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'ENTITIES'; + public const string SCHEMA_TYPE = 'ENTITIES'; /** @@ -23,7 +22,6 @@ class EntitiesValue extends TokenValue implements ListTypeInterface * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/EntityValue.php b/src/XMLSchema/Type/EntityValue.php index b411aaf4..031a8e25 100644 --- a/src/XMLSchema/Type/EntityValue.php +++ b/src/XMLSchema/Type/EntityValue.php @@ -9,6 +9,5 @@ */ class EntityValue extends NCNameValue { - /** @var string */ - public const SCHEMA_TYPE = 'ENTITY'; + public const string SCHEMA_TYPE = 'ENTITY'; } diff --git a/src/XMLSchema/Type/FloatValue.php b/src/XMLSchema/Type/FloatValue.php index a7cf5e9d..bdbc6e47 100644 --- a/src/XMLSchema/Type/FloatValue.php +++ b/src/XMLSchema/Type/FloatValue.php @@ -13,15 +13,13 @@ */ class FloatValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'float'; + public const string SCHEMA_TYPE = 'float'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Helper/AnyURIListValue.php b/src/XMLSchema/Type/Helper/AnyURIListValue.php index 677074ee..991b3c4a 100644 --- a/src/XMLSchema/Type/Helper/AnyURIListValue.php +++ b/src/XMLSchema/Type/Helper/AnyURIListValue.php @@ -25,7 +25,6 @@ class AnyURIListValue extends AnyURIValue implements ListTypeInterface * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -39,7 +38,6 @@ protected function validateValue(string $value): void * Convert an array of xs:anyURI items into an AnyURIListValue * * @param string[] $uris - * @return static */ public static function fromArray(array $uris): static { diff --git a/src/XMLSchema/Type/HexBinaryValue.php b/src/XMLSchema/Type/HexBinaryValue.php index c076fb1a..bfa3289f 100644 --- a/src/XMLSchema/Type/HexBinaryValue.php +++ b/src/XMLSchema/Type/HexBinaryValue.php @@ -13,15 +13,13 @@ */ class HexBinaryValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'hexBinary'; + public const string SCHEMA_TYPE = 'hexBinary'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/IDRefValue.php b/src/XMLSchema/Type/IDRefValue.php index d5256a0e..743a99bd 100644 --- a/src/XMLSchema/Type/IDRefValue.php +++ b/src/XMLSchema/Type/IDRefValue.php @@ -9,6 +9,5 @@ */ class IDRefValue extends NCNameValue { - /** @var string */ - public const SCHEMA_TYPE = 'IDREF'; + public const string SCHEMA_TYPE = 'IDREF'; } diff --git a/src/XMLSchema/Type/IDRefsValue.php b/src/XMLSchema/Type/IDRefsValue.php index b1ec4c6d..4249dab3 100644 --- a/src/XMLSchema/Type/IDRefsValue.php +++ b/src/XMLSchema/Type/IDRefsValue.php @@ -14,8 +14,7 @@ */ class IDRefsValue extends TokenValue implements ListTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'IDREFS'; + public const string SCHEMA_TYPE = 'IDREFS'; /** @@ -23,7 +22,6 @@ class IDRefsValue extends TokenValue implements ListTypeInterface * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/IDValue.php b/src/XMLSchema/Type/IDValue.php index e778850b..b0972d8f 100644 --- a/src/XMLSchema/Type/IDValue.php +++ b/src/XMLSchema/Type/IDValue.php @@ -9,6 +9,5 @@ */ class IDValue extends NCNameValue { - /** @var string */ - public const SCHEMA_TYPE = 'ID'; + public const string SCHEMA_TYPE = 'ID'; } diff --git a/src/XMLSchema/Type/IntValue.php b/src/XMLSchema/Type/IntValue.php index b8548f39..41e8283a 100644 --- a/src/XMLSchema/Type/IntValue.php +++ b/src/XMLSchema/Type/IntValue.php @@ -12,8 +12,7 @@ */ class IntValue extends LongValue { - /** @var string */ - public const SCHEMA_TYPE = 'int'; + public const string SCHEMA_TYPE = 'int'; /** @@ -21,7 +20,6 @@ class IntValue extends LongValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/IntegerValue.php b/src/XMLSchema/Type/IntegerValue.php index 44e546b9..2ca85a4b 100644 --- a/src/XMLSchema/Type/IntegerValue.php +++ b/src/XMLSchema/Type/IntegerValue.php @@ -17,8 +17,7 @@ */ class IntegerValue extends DecimalValue { - /** @var string */ - public const SCHEMA_TYPE = 'integer'; + public const string SCHEMA_TYPE = 'integer'; /** @@ -26,7 +25,6 @@ class IntegerValue extends DecimalValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -38,7 +36,6 @@ protected function validateValue(string $value): void * Convert from integer * * @param int $value - * @return static */ public static function fromInteger(int $value): static { @@ -48,8 +45,6 @@ public static function fromInteger(int $value): static /** * Convert to integer - * - * @return int */ public function toInteger(): int { diff --git a/src/XMLSchema/Type/LanguageValue.php b/src/XMLSchema/Type/LanguageValue.php index 100c4d65..0f223b26 100644 --- a/src/XMLSchema/Type/LanguageValue.php +++ b/src/XMLSchema/Type/LanguageValue.php @@ -12,8 +12,7 @@ */ class LanguageValue extends TokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'language'; + public const string SCHEMA_TYPE = 'language'; /** @@ -21,7 +20,6 @@ class LanguageValue extends TokenValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/LongValue.php b/src/XMLSchema/Type/LongValue.php index e6037d57..93a3f7e7 100644 --- a/src/XMLSchema/Type/LongValue.php +++ b/src/XMLSchema/Type/LongValue.php @@ -12,8 +12,7 @@ */ class LongValue extends IntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'long'; + public const string SCHEMA_TYPE = 'long'; /** @@ -21,7 +20,6 @@ class LongValue extends IntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/MonthValue.php b/src/XMLSchema/Type/MonthValue.php index 20f708f1..df032a11 100644 --- a/src/XMLSchema/Type/MonthValue.php +++ b/src/XMLSchema/Type/MonthValue.php @@ -13,15 +13,13 @@ */ class MonthValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'gMonth'; + public const string SCHEMA_TYPE = 'gMonth'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NCNameValue.php b/src/XMLSchema/Type/NCNameValue.php index 5b0a984d..ce94bf4d 100644 --- a/src/XMLSchema/Type/NCNameValue.php +++ b/src/XMLSchema/Type/NCNameValue.php @@ -12,8 +12,7 @@ */ class NCNameValue extends TokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'NCName'; + public const string SCHEMA_TYPE = 'NCName'; /** @@ -21,7 +20,6 @@ class NCNameValue extends TokenValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NMTokenValue.php b/src/XMLSchema/Type/NMTokenValue.php index 29021f2a..5116ccab 100644 --- a/src/XMLSchema/Type/NMTokenValue.php +++ b/src/XMLSchema/Type/NMTokenValue.php @@ -12,8 +12,7 @@ */ class NMTokenValue extends TokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'NMTOKEN'; + public const string SCHEMA_TYPE = 'NMTOKEN'; /** @@ -21,7 +20,6 @@ class NMTokenValue extends TokenValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NMTokensValue.php b/src/XMLSchema/Type/NMTokensValue.php index 019afa95..a4f59af0 100644 --- a/src/XMLSchema/Type/NMTokensValue.php +++ b/src/XMLSchema/Type/NMTokensValue.php @@ -17,8 +17,7 @@ */ class NMTokensValue extends TokenValue implements ListTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'NMTOKENS'; + public const string SCHEMA_TYPE = 'NMTOKENS'; /** @@ -26,7 +25,6 @@ class NMTokensValue extends TokenValue implements ListTypeInterface * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NameValue.php b/src/XMLSchema/Type/NameValue.php index d27b7e05..51bc9d8e 100644 --- a/src/XMLSchema/Type/NameValue.php +++ b/src/XMLSchema/Type/NameValue.php @@ -12,8 +12,7 @@ */ class NameValue extends TokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'Name'; + public const string SCHEMA_TYPE = 'Name'; /** @@ -21,7 +20,6 @@ class NameValue extends TokenValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NegativeIntegerValue.php b/src/XMLSchema/Type/NegativeIntegerValue.php index 2105e6d5..ceebc9d4 100644 --- a/src/XMLSchema/Type/NegativeIntegerValue.php +++ b/src/XMLSchema/Type/NegativeIntegerValue.php @@ -12,8 +12,7 @@ */ class NegativeIntegerValue extends IntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'negativeInteger'; + public const string SCHEMA_TYPE = 'negativeInteger'; /** @@ -21,7 +20,6 @@ class NegativeIntegerValue extends IntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NonNegativeIntegerValue.php b/src/XMLSchema/Type/NonNegativeIntegerValue.php index 1e031972..db0411e2 100644 --- a/src/XMLSchema/Type/NonNegativeIntegerValue.php +++ b/src/XMLSchema/Type/NonNegativeIntegerValue.php @@ -12,8 +12,7 @@ */ class NonNegativeIntegerValue extends IntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'nonNegativeInteger'; + public const string SCHEMA_TYPE = 'nonNegativeInteger'; /** @@ -21,7 +20,6 @@ class NonNegativeIntegerValue extends IntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NonPositiveIntegerValue.php b/src/XMLSchema/Type/NonPositiveIntegerValue.php index 1c07c4b6..a27fe152 100644 --- a/src/XMLSchema/Type/NonPositiveIntegerValue.php +++ b/src/XMLSchema/Type/NonPositiveIntegerValue.php @@ -12,8 +12,7 @@ */ class NonPositiveIntegerValue extends IntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'nonPositiveInteger'; + public const string SCHEMA_TYPE = 'nonPositiveInteger'; /** @@ -21,7 +20,6 @@ class NonPositiveIntegerValue extends IntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/NormalizedStringValue.php b/src/XMLSchema/Type/NormalizedStringValue.php index df5a51fa..0b76c503 100644 --- a/src/XMLSchema/Type/NormalizedStringValue.php +++ b/src/XMLSchema/Type/NormalizedStringValue.php @@ -9,15 +9,13 @@ */ class NormalizedStringValue extends StringValue { - /** @var string */ - public const SCHEMA_TYPE = 'normalizedString'; + public const string SCHEMA_TYPE = 'normalizedString'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { diff --git a/src/XMLSchema/Type/PositiveIntegerValue.php b/src/XMLSchema/Type/PositiveIntegerValue.php index 74e34940..b3fb7197 100644 --- a/src/XMLSchema/Type/PositiveIntegerValue.php +++ b/src/XMLSchema/Type/PositiveIntegerValue.php @@ -12,8 +12,7 @@ */ class PositiveIntegerValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'positiveInteger'; + public const string SCHEMA_TYPE = 'positiveInteger'; /** @@ -21,7 +20,6 @@ class PositiveIntegerValue extends NonNegativeIntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/QNameValue.php b/src/XMLSchema/Type/QNameValue.php index f2ce7d7a..cd1e0bf4 100644 --- a/src/XMLSchema/Type/QNameValue.php +++ b/src/XMLSchema/Type/QNameValue.php @@ -17,20 +17,15 @@ */ class QNameValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'QName'; + public const string SCHEMA_TYPE = 'QName'; - /** @var \SimpleSAML\XMLSchema\Type\AnyURIValue|null */ protected ?AnyURIValue $namespaceURI; - /** @var \SimpleSAML\XMLSchema\Type\NCNameValue|null */ protected ?NCNameValue $namespacePrefix; - /** @var \SimpleSAML\XMLSchema\Type\NCNameValue */ protected NCNameValue $localName; - /** @var string */ private static string $qname_regex = '/^ (?: \{ # Match a literal { @@ -49,7 +44,6 @@ class QNameValue extends AbstractAnySimpleType * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -62,7 +56,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -92,8 +85,6 @@ protected function validateValue(string $value): void /** * Get the value. - * - * @return string */ public function getValue(): string { @@ -139,7 +130,6 @@ public function getLocalName(): NCNameValue * @param \SimpleSAML\XMLSchema\Type\NCNameValue $localName * @param \SimpleSAML\XMLSchema\Type\AnyURIValue|null $namespaceURI * @param \SimpleSAML\XMLSchema\Type\NCNameValue|null $namespacePrefix - * @return static */ public static function fromParts( NCNameValue $localName, diff --git a/src/XMLSchema/Type/Schema/AbstractAllNNIValue.php b/src/XMLSchema/Type/Schema/AbstractAllNNIValue.php index f8bac238..56ac76da 100644 --- a/src/XMLSchema/Type/Schema/AbstractAllNNIValue.php +++ b/src/XMLSchema/Type/Schema/AbstractAllNNIValue.php @@ -18,7 +18,6 @@ abstract class AbstractAllNNIValue extends NonNegativeIntegerValue * * @param string $value The value * @throws \Exception on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/BlockSetValue.php b/src/XMLSchema/Type/Schema/BlockSetValue.php index 4ad05e08..4b06dbce 100644 --- a/src/XMLSchema/Type/Schema/BlockSetValue.php +++ b/src/XMLSchema/Type/Schema/BlockSetValue.php @@ -17,8 +17,7 @@ */ class BlockSetValue extends NMTokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'blockSet'; + public const string SCHEMA_TYPE = 'blockSet'; /** @@ -26,7 +25,6 @@ class BlockSetValue extends NMTokenValue * * @param string $value The value * @throws \Exception on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/DerivationControlValue.php b/src/XMLSchema/Type/Schema/DerivationControlValue.php index 67a9ddeb..088884b7 100644 --- a/src/XMLSchema/Type/Schema/DerivationControlValue.php +++ b/src/XMLSchema/Type/Schema/DerivationControlValue.php @@ -21,7 +21,6 @@ class DerivationControlValue extends NMTokenValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -35,7 +34,6 @@ protected function validateValue(string $value): void /** * @param \SimpleSAML\XMLSchema\XML\Enumeration\DerivationControlEnum $value - * @return static */ public static function fromEnum(DerivationControlEnum $value): static { diff --git a/src/XMLSchema/Type/Schema/DerivationSetValue.php b/src/XMLSchema/Type/Schema/DerivationSetValue.php index e233de54..efbe3692 100644 --- a/src/XMLSchema/Type/Schema/DerivationSetValue.php +++ b/src/XMLSchema/Type/Schema/DerivationSetValue.php @@ -16,8 +16,7 @@ */ class DerivationSetValue extends DerivationControlValue { - /** @var string */ - public const SCHEMA_TYPE = 'derivationSet'; + public const string SCHEMA_TYPE = 'derivationSet'; /** @@ -25,7 +24,6 @@ class DerivationSetValue extends DerivationControlValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/FormChoiceValue.php b/src/XMLSchema/Type/Schema/FormChoiceValue.php index 7a56ffde..3c997a11 100644 --- a/src/XMLSchema/Type/Schema/FormChoiceValue.php +++ b/src/XMLSchema/Type/Schema/FormChoiceValue.php @@ -21,7 +21,6 @@ class FormChoiceValue extends NMTokenValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -35,7 +34,6 @@ protected function validateValue(string $value): void /** * @param \SimpleSAML\XMLSchema\XML\Enumeration\FormChoiceEnum $value - * @return static */ public static function fromEnum(FormChoiceEnum $value): static { diff --git a/src/XMLSchema/Type/Schema/FullDerivationSetValue.php b/src/XMLSchema/Type/Schema/FullDerivationSetValue.php index 65f9e7af..5430049d 100644 --- a/src/XMLSchema/Type/Schema/FullDerivationSetValue.php +++ b/src/XMLSchema/Type/Schema/FullDerivationSetValue.php @@ -16,8 +16,7 @@ */ class FullDerivationSetValue extends DerivationControlValue { - /** @var string */ - public const SCHEMA_TYPE = 'fullDerivationSet'; + public const string SCHEMA_TYPE = 'fullDerivationSet'; /** @@ -25,7 +24,6 @@ class FullDerivationSetValue extends DerivationControlValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/MaxOccursValue.php b/src/XMLSchema/Type/Schema/MaxOccursValue.php index 3dda70ce..9097a1f3 100644 --- a/src/XMLSchema/Type/Schema/MaxOccursValue.php +++ b/src/XMLSchema/Type/Schema/MaxOccursValue.php @@ -9,6 +9,5 @@ */ class MaxOccursValue extends AbstractAllNNIValue { - /** @var string */ - public const SCHEMA_TYPE = 'maxOccurs'; + public const string SCHEMA_TYPE = 'maxOccurs'; } diff --git a/src/XMLSchema/Type/Schema/MinOccursValue.php b/src/XMLSchema/Type/Schema/MinOccursValue.php index 313fb099..e67bb869 100644 --- a/src/XMLSchema/Type/Schema/MinOccursValue.php +++ b/src/XMLSchema/Type/Schema/MinOccursValue.php @@ -11,6 +11,5 @@ */ class MinOccursValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'minOccurs'; + public const string SCHEMA_TYPE = 'minOccurs'; } diff --git a/src/XMLSchema/Type/Schema/NamespaceListValue.php b/src/XMLSchema/Type/Schema/NamespaceListValue.php index e05ae1d8..be99c741 100644 --- a/src/XMLSchema/Type/Schema/NamespaceListValue.php +++ b/src/XMLSchema/Type/Schema/NamespaceListValue.php @@ -17,8 +17,7 @@ */ class NamespaceListValue extends NMTokensValue { - /** @var string */ - public const SCHEMA_TYPE = 'namespaceList'; + public const string SCHEMA_TYPE = 'namespaceList'; /** @@ -26,7 +25,6 @@ class NamespaceListValue 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/XMLSchema/Type/Schema/ProcessContentsValue.php b/src/XMLSchema/Type/Schema/ProcessContentsValue.php index 1c7860c2..cb2b4659 100644 --- a/src/XMLSchema/Type/Schema/ProcessContentsValue.php +++ b/src/XMLSchema/Type/Schema/ProcessContentsValue.php @@ -21,7 +21,6 @@ class ProcessContentsValue extends NMTokenValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -35,7 +34,6 @@ protected function validateValue(string $value): void /** * @param \SimpleSAML\XMLSchema\XML\Enumeration\ProcessContentsEnum $value - * @return static */ public static function fromEnum(ProcessContentsEnum $value): static { diff --git a/src/XMLSchema/Type/Schema/PublicValue.php b/src/XMLSchema/Type/Schema/PublicValue.php index 199ee5d2..382ad245 100644 --- a/src/XMLSchema/Type/Schema/PublicValue.php +++ b/src/XMLSchema/Type/Schema/PublicValue.php @@ -11,6 +11,5 @@ */ class PublicValue extends TokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'public'; + public const string SCHEMA_TYPE = 'public'; } diff --git a/src/XMLSchema/Type/Schema/ReducedDerivationControlValue.php b/src/XMLSchema/Type/Schema/ReducedDerivationControlValue.php index 017b0bb1..2217b3e8 100644 --- a/src/XMLSchema/Type/Schema/ReducedDerivationControlValue.php +++ b/src/XMLSchema/Type/Schema/ReducedDerivationControlValue.php @@ -20,7 +20,6 @@ class ReducedDerivationControlValue extends DerivationControlValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/SimpleDerivationSetValue.php b/src/XMLSchema/Type/Schema/SimpleDerivationSetValue.php index 27dc837b..5e78fa5e 100644 --- a/src/XMLSchema/Type/Schema/SimpleDerivationSetValue.php +++ b/src/XMLSchema/Type/Schema/SimpleDerivationSetValue.php @@ -16,8 +16,7 @@ */ class SimpleDerivationSetValue extends DerivationControlValue { - /** @var string */ - public const SCHEMA_TYPE = 'simpleDerivationSet'; + public const string SCHEMA_TYPE = 'simpleDerivationSet'; /** @@ -25,7 +24,6 @@ class SimpleDerivationSetValue extends DerivationControlValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/TypeDerivationControlValue.php b/src/XMLSchema/Type/Schema/TypeDerivationControlValue.php index 61604492..90a6483c 100644 --- a/src/XMLSchema/Type/Schema/TypeDerivationControlValue.php +++ b/src/XMLSchema/Type/Schema/TypeDerivationControlValue.php @@ -20,7 +20,6 @@ class TypeDerivationControlValue extends DerivationControlValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/Schema/UseValue.php b/src/XMLSchema/Type/Schema/UseValue.php index dae84a95..75f7e468 100644 --- a/src/XMLSchema/Type/Schema/UseValue.php +++ b/src/XMLSchema/Type/Schema/UseValue.php @@ -21,7 +21,6 @@ class UseValue extends NMTokenValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -35,7 +34,6 @@ protected function validateValue(string $value): void /** * @param \SimpleSAML\XMLSchema\XML\Enumeration\UseEnum $value - * @return static */ public static function fromEnum(UseEnum $value): static { diff --git a/src/XMLSchema/Type/Schema/WhiteSpaceValue.php b/src/XMLSchema/Type/Schema/WhiteSpaceValue.php index 2c2cc2f6..e720b0b5 100644 --- a/src/XMLSchema/Type/Schema/WhiteSpaceValue.php +++ b/src/XMLSchema/Type/Schema/WhiteSpaceValue.php @@ -16,8 +16,7 @@ */ class WhiteSpaceValue extends NMTokenValue { - /** @var string */ - public const SCHEMA_TYPE = 'whiteSpace'; + public const string SCHEMA_TYPE = 'whiteSpace'; /** @@ -25,7 +24,6 @@ class WhiteSpaceValue extends NMTokenValue * * @param string $value The value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { @@ -39,7 +37,6 @@ protected function validateValue(string $value): void /** * @param \SimpleSAML\XMLSchema\XML\Enumeration\WhiteSpaceEnum $value - * @return static */ public static function fromEnum(WhiteSpaceEnum $value): static { diff --git a/src/XMLSchema/Type/ShortValue.php b/src/XMLSchema/Type/ShortValue.php index 8e223c75..4d53ee89 100644 --- a/src/XMLSchema/Type/ShortValue.php +++ b/src/XMLSchema/Type/ShortValue.php @@ -12,8 +12,7 @@ */ class ShortValue extends IntValue { - /** @var string */ - public const SCHEMA_TYPE = 'short'; + public const string SCHEMA_TYPE = 'short'; /** @@ -21,7 +20,6 @@ class ShortValue extends IntValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/StringValue.php b/src/XMLSchema/Type/StringValue.php index 9173e38e..d7858cd5 100644 --- a/src/XMLSchema/Type/StringValue.php +++ b/src/XMLSchema/Type/StringValue.php @@ -11,6 +11,5 @@ */ class StringValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'string'; + public const string SCHEMA_TYPE = 'string'; } diff --git a/src/XMLSchema/Type/TimeValue.php b/src/XMLSchema/Type/TimeValue.php index 6862f6bb..7b0087e1 100644 --- a/src/XMLSchema/Type/TimeValue.php +++ b/src/XMLSchema/Type/TimeValue.php @@ -13,15 +13,13 @@ */ class TimeValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'time'; + public const string SCHEMA_TYPE = 'time'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/TokenValue.php b/src/XMLSchema/Type/TokenValue.php index 79893330..27adfed1 100644 --- a/src/XMLSchema/Type/TokenValue.php +++ b/src/XMLSchema/Type/TokenValue.php @@ -9,15 +9,13 @@ */ class TokenValue extends NormalizedStringValue { - /** @var string */ - public const SCHEMA_TYPE = 'token'; + public const string SCHEMA_TYPE = 'token'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { diff --git a/src/XMLSchema/Type/UnsignedByteValue.php b/src/XMLSchema/Type/UnsignedByteValue.php index 7c3a2b7c..49d4bee9 100644 --- a/src/XMLSchema/Type/UnsignedByteValue.php +++ b/src/XMLSchema/Type/UnsignedByteValue.php @@ -12,8 +12,7 @@ */ class UnsignedByteValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'unsignedByte'; + public const string SCHEMA_TYPE = 'unsignedByte'; /** @@ -21,7 +20,6 @@ class UnsignedByteValue extends NonNegativeIntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/UnsignedIntValue.php b/src/XMLSchema/Type/UnsignedIntValue.php index 92422cf7..f1e6159d 100644 --- a/src/XMLSchema/Type/UnsignedIntValue.php +++ b/src/XMLSchema/Type/UnsignedIntValue.php @@ -12,8 +12,7 @@ */ class UnsignedIntValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'unsignedInt'; + public const string SCHEMA_TYPE = 'unsignedInt'; /** @@ -21,7 +20,6 @@ class UnsignedIntValue extends NonNegativeIntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/UnsignedLongValue.php b/src/XMLSchema/Type/UnsignedLongValue.php index 826b1d92..e3d505d0 100644 --- a/src/XMLSchema/Type/UnsignedLongValue.php +++ b/src/XMLSchema/Type/UnsignedLongValue.php @@ -12,8 +12,7 @@ */ class UnsignedLongValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'unsignedLong'; + public const string SCHEMA_TYPE = 'unsignedLong'; /** @@ -21,7 +20,6 @@ class UnsignedLongValue extends NonNegativeIntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/UnsignedShortValue.php b/src/XMLSchema/Type/UnsignedShortValue.php index 3e9961f3..4401b25d 100644 --- a/src/XMLSchema/Type/UnsignedShortValue.php +++ b/src/XMLSchema/Type/UnsignedShortValue.php @@ -12,8 +12,7 @@ */ class UnsignedShortValue extends NonNegativeIntegerValue { - /** @var string */ - public const SCHEMA_TYPE = 'unsignedShort'; + public const string SCHEMA_TYPE = 'unsignedShort'; /** @@ -21,7 +20,6 @@ class UnsignedShortValue extends NonNegativeIntegerValue * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/YearMonthValue.php b/src/XMLSchema/Type/YearMonthValue.php index 4b4b2598..e48ae4a2 100644 --- a/src/XMLSchema/Type/YearMonthValue.php +++ b/src/XMLSchema/Type/YearMonthValue.php @@ -13,15 +13,13 @@ */ class YearMonthValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'gYearMonth'; + public const string SCHEMA_TYPE = 'gYearMonth'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/Type/YearValue.php b/src/XMLSchema/Type/YearValue.php index 8c8f54ec..c9e9a196 100644 --- a/src/XMLSchema/Type/YearValue.php +++ b/src/XMLSchema/Type/YearValue.php @@ -13,15 +13,13 @@ */ class YearValue extends AbstractAnySimpleType { - /** @var string */ - public const SCHEMA_TYPE = 'gYear'; + public const string SCHEMA_TYPE = 'gYear'; /** * Sanitize the value. * * @param string $value The unsanitized value - * @return string */ protected function sanitizeValue(string $value): string { @@ -34,7 +32,6 @@ protected function sanitizeValue(string $value): string * * @param string $value * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure - * @return void */ protected function validateValue(string $value): void { diff --git a/src/XMLSchema/XML/AbstractAll.php b/src/XMLSchema/XML/AbstractAll.php index 4573c561..586f586e 100644 --- a/src/XMLSchema/XML/AbstractAll.php +++ b/src/XMLSchema/XML/AbstractAll.php @@ -19,7 +19,7 @@ abstract class AbstractAll extends AbstractExplicitGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractAnyType.php b/src/XMLSchema/XML/AbstractAnyType.php index 27c94e7d..8fee907e 100644 --- a/src/XMLSchema/XML/AbstractAnyType.php +++ b/src/XMLSchema/XML/AbstractAnyType.php @@ -21,10 +21,10 @@ abstract class AbstractAnyType extends AbstractXsElement /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = NS::ANY; + public const string|array 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|array XS_ANY_ATTR_NAMESPACE = NS::ANY; /** diff --git a/src/XMLSchema/XML/AbstractExplicitGroup.php b/src/XMLSchema/XML/AbstractExplicitGroup.php index 260960cb..e87fc98d 100644 --- a/src/XMLSchema/XML/AbstractExplicitGroup.php +++ b/src/XMLSchema/XML/AbstractExplicitGroup.php @@ -17,7 +17,7 @@ abstract class AbstractExplicitGroup extends AbstractGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractNamedAttributeGroup.php b/src/XMLSchema/XML/AbstractNamedAttributeGroup.php index 5e2ea7c4..8b2b53d0 100644 --- a/src/XMLSchema/XML/AbstractNamedAttributeGroup.php +++ b/src/XMLSchema/XML/AbstractNamedAttributeGroup.php @@ -16,7 +16,7 @@ abstract class AbstractNamedAttributeGroup extends AbstractAttributeGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractNamedGroup.php b/src/XMLSchema/XML/AbstractNamedGroup.php index 08a528d5..692b80ff 100644 --- a/src/XMLSchema/XML/AbstractNamedGroup.php +++ b/src/XMLSchema/XML/AbstractNamedGroup.php @@ -19,7 +19,7 @@ abstract class AbstractNamedGroup extends AbstractRealGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractOpenAttrs.php b/src/XMLSchema/XML/AbstractOpenAttrs.php index 32abdccb..2e36eace 100644 --- a/src/XMLSchema/XML/AbstractOpenAttrs.php +++ b/src/XMLSchema/XML/AbstractOpenAttrs.php @@ -14,10 +14,10 @@ abstract class AbstractOpenAttrs extends AbstractAnyType { /** The namespace-attribute for the xs:any element */ - public const XS_ANY_ELT_NAMESPACE = []; + public const array XS_ANY_ELT_NAMESPACE = []; /** 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; /** diff --git a/src/XMLSchema/XML/AbstractRealGroup.php b/src/XMLSchema/XML/AbstractRealGroup.php index e0f5a9c4..30d35b75 100644 --- a/src/XMLSchema/XML/AbstractRealGroup.php +++ b/src/XMLSchema/XML/AbstractRealGroup.php @@ -24,7 +24,7 @@ abstract class AbstractRealGroup extends AbstractGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractReferencedAttributeGroup.php b/src/XMLSchema/XML/AbstractReferencedAttributeGroup.php index 8547f993..181bfd37 100644 --- a/src/XMLSchema/XML/AbstractReferencedAttributeGroup.php +++ b/src/XMLSchema/XML/AbstractReferencedAttributeGroup.php @@ -16,7 +16,7 @@ abstract class AbstractReferencedAttributeGroup extends AbstractAttributeGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractReferencedGroup.php b/src/XMLSchema/XML/AbstractReferencedGroup.php index 404579b5..d83a760d 100644 --- a/src/XMLSchema/XML/AbstractReferencedGroup.php +++ b/src/XMLSchema/XML/AbstractReferencedGroup.php @@ -16,7 +16,7 @@ abstract class AbstractReferencedGroup extends AbstractRealGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractSimpleExplicitGroup.php b/src/XMLSchema/XML/AbstractSimpleExplicitGroup.php index e66e58b1..222de8e8 100644 --- a/src/XMLSchema/XML/AbstractSimpleExplicitGroup.php +++ b/src/XMLSchema/XML/AbstractSimpleExplicitGroup.php @@ -15,7 +15,7 @@ abstract class AbstractSimpleExplicitGroup extends AbstractExplicitGroup { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractTopLevelAttribute.php b/src/XMLSchema/XML/AbstractTopLevelAttribute.php index 23c267d3..3b401f14 100644 --- a/src/XMLSchema/XML/AbstractTopLevelAttribute.php +++ b/src/XMLSchema/XML/AbstractTopLevelAttribute.php @@ -18,7 +18,7 @@ abstract class AbstractTopLevelAttribute extends AbstractAttribute { /** 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; /** diff --git a/src/XMLSchema/XML/AbstractXsElement.php b/src/XMLSchema/XML/AbstractXsElement.php index 2ce55bdc..e9704dc6 100644 --- a/src/XMLSchema/XML/AbstractXsElement.php +++ b/src/XMLSchema/XML/AbstractXsElement.php @@ -14,12 +14,9 @@ */ abstract class AbstractXsElement extends BaseElement { - /** @var string */ - public const NS = C::NS_XS; + public const string NS = C::NS_XS; - /** @var string */ - public const NS_PREFIX = 'xs'; + public const string NS_PREFIX = 'xs'; - /** @var string */ - public const SCHEMA = 'resources/schemas/XMLSchema.xsd'; + public const string SCHEMA = 'resources/schemas/XMLSchema.xsd'; } diff --git a/src/XMLSchema/XML/All.php b/src/XMLSchema/XML/All.php index a8d2d869..81143d54 100644 --- a/src/XMLSchema/XML/All.php +++ b/src/XMLSchema/XML/All.php @@ -34,8 +34,7 @@ final class All extends AbstractAll implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'all'; + public const string LOCALNAME = 'all'; /** diff --git a/src/XMLSchema/XML/Annotation.php b/src/XMLSchema/XML/Annotation.php index eff70917..c8e8115b 100644 --- a/src/XMLSchema/XML/Annotation.php +++ b/src/XMLSchema/XML/Annotation.php @@ -24,8 +24,7 @@ final class Annotation extends AbstractOpenAttrs implements SchemaValidatableEle use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'annotation'; + public const string LOCALNAME = 'annotation'; /** diff --git a/src/XMLSchema/XML/Any.php b/src/XMLSchema/XML/Any.php index 0ab94faa..853e73df 100644 --- a/src/XMLSchema/XML/Any.php +++ b/src/XMLSchema/XML/Any.php @@ -34,8 +34,7 @@ final class Any extends AbstractWildcard implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'any'; + public const string LOCALNAME = 'any'; /** diff --git a/src/XMLSchema/XML/AnyAttribute.php b/src/XMLSchema/XML/AnyAttribute.php index 71566306..57c50a0b 100644 --- a/src/XMLSchema/XML/AnyAttribute.php +++ b/src/XMLSchema/XML/AnyAttribute.php @@ -26,8 +26,7 @@ final class AnyAttribute extends AbstractWildcard implements SchemaValidatableEl use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'anyAttribute'; + public const string LOCALNAME = 'anyAttribute'; /** diff --git a/src/XMLSchema/XML/Appinfo.php b/src/XMLSchema/XML/Appinfo.php index 05092560..c838396c 100644 --- a/src/XMLSchema/XML/Appinfo.php +++ b/src/XMLSchema/XML/Appinfo.php @@ -27,11 +27,10 @@ final class Appinfo extends AbstractXsElement implements SchemaValidatableElemen use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'appinfo'; + public const string LOCALNAME = 'appinfo'; /** The namespace-attribute for the xs:anyAttribute element */ - public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; + public const array|string XS_ANY_ATTR_NAMESPACE = NS::OTHER; /** diff --git a/src/XMLSchema/XML/Choice.php b/src/XMLSchema/XML/Choice.php index 8a010f55..6d7fa60d 100644 --- a/src/XMLSchema/XML/Choice.php +++ b/src/XMLSchema/XML/Choice.php @@ -35,8 +35,7 @@ final class Choice extends AbstractExplicitGroup implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'choice'; + public const string LOCALNAME = 'choice'; /** diff --git a/src/XMLSchema/XML/ComplexContent.php b/src/XMLSchema/XML/ComplexContent.php index 87c34e01..7cf6c032 100644 --- a/src/XMLSchema/XML/ComplexContent.php +++ b/src/XMLSchema/XML/ComplexContent.php @@ -26,8 +26,7 @@ final class ComplexContent extends AbstractAnnotated implements SchemaValidatabl use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'complexContent'; + public const string LOCALNAME = 'complexContent'; /** diff --git a/src/XMLSchema/XML/ComplexRestriction.php b/src/XMLSchema/XML/ComplexRestriction.php index e3e0dffb..376653dd 100644 --- a/src/XMLSchema/XML/ComplexRestriction.php +++ b/src/XMLSchema/XML/ComplexRestriction.php @@ -21,8 +21,7 @@ */ final class ComplexRestriction extends AbstractComplexRestrictionType { - /** @var string */ - public const LOCALNAME = 'restriction'; + public const string LOCALNAME = 'restriction'; /** diff --git a/src/XMLSchema/XML/Documentation.php b/src/XMLSchema/XML/Documentation.php index 8bfa9a2f..d8a79765 100644 --- a/src/XMLSchema/XML/Documentation.php +++ b/src/XMLSchema/XML/Documentation.php @@ -29,14 +29,13 @@ final class Documentation extends AbstractXsElement implements SchemaValidatable use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'documentation'; + public const string LOCALNAME = 'documentation'; /** 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; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ [C::NS_XML, 'lang'], ]; diff --git a/src/XMLSchema/XML/Enumeration.php b/src/XMLSchema/XML/Enumeration.php index 3f4bb0d8..12450b63 100644 --- a/src/XMLSchema/XML/Enumeration.php +++ b/src/XMLSchema/XML/Enumeration.php @@ -18,6 +18,5 @@ final class Enumeration extends AbstractNoFixedFacet implements SchemaValidatabl use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'enumeration'; + public const string LOCALNAME = 'enumeration'; } diff --git a/src/XMLSchema/XML/Extension.php b/src/XMLSchema/XML/Extension.php index ea1a5817..0ba00834 100644 --- a/src/XMLSchema/XML/Extension.php +++ b/src/XMLSchema/XML/Extension.php @@ -21,8 +21,7 @@ */ final class Extension extends AbstractExtensionType { - /** @var string */ - public const LOCALNAME = 'extension'; + public const string LOCALNAME = 'extension'; /** diff --git a/src/XMLSchema/XML/Field.php b/src/XMLSchema/XML/Field.php index e1b0da10..e8a646e4 100644 --- a/src/XMLSchema/XML/Field.php +++ b/src/XMLSchema/XML/Field.php @@ -26,11 +26,9 @@ final class Field extends AbstractAnnotated implements SchemaValidatableElementI use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'field'; + public const string LOCALNAME = 'field'; - /** @var string */ public static string $field_regex = '/^ ( (\.\/\/)? diff --git a/src/XMLSchema/XML/FractionDigits.php b/src/XMLSchema/XML/FractionDigits.php index aad0e5ab..2bc7fe5f 100644 --- a/src/XMLSchema/XML/FractionDigits.php +++ b/src/XMLSchema/XML/FractionDigits.php @@ -18,6 +18,5 @@ final class FractionDigits extends AbstractNumFacet implements SchemaValidatable use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'fractionDigits'; + public const string LOCALNAME = 'fractionDigits'; } diff --git a/src/XMLSchema/XML/Import.php b/src/XMLSchema/XML/Import.php index 9fff04c3..015ee7fe 100644 --- a/src/XMLSchema/XML/Import.php +++ b/src/XMLSchema/XML/Import.php @@ -25,8 +25,7 @@ final class Import extends AbstractAnnotated implements SchemaValidatableElement use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'import'; + public const string LOCALNAME = 'import'; /** diff --git a/src/XMLSchema/XML/Key.php b/src/XMLSchema/XML/Key.php index cb446845..f9c2f5c8 100644 --- a/src/XMLSchema/XML/Key.php +++ b/src/XMLSchema/XML/Key.php @@ -24,8 +24,7 @@ final class Key extends AbstractKeybase implements IdentityConstraintInterface, use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'key'; + public const string LOCALNAME = 'key'; /** diff --git a/src/XMLSchema/XML/Keyref.php b/src/XMLSchema/XML/Keyref.php index 4da13ac1..a49cdd40 100644 --- a/src/XMLSchema/XML/Keyref.php +++ b/src/XMLSchema/XML/Keyref.php @@ -27,8 +27,7 @@ final class Keyref extends AbstractKeybase implements IdentityConstraintInterfac use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'keyref'; + public const string LOCALNAME = 'keyref'; /** diff --git a/src/XMLSchema/XML/Length.php b/src/XMLSchema/XML/Length.php index 8f8adcbd..79f33614 100644 --- a/src/XMLSchema/XML/Length.php +++ b/src/XMLSchema/XML/Length.php @@ -18,6 +18,5 @@ final class Length extends AbstractNumFacet implements SchemaValidatableElementI use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'length'; + public const string LOCALNAME = 'length'; } diff --git a/src/XMLSchema/XML/LocalAttribute.php b/src/XMLSchema/XML/LocalAttribute.php index 3ecee581..4ef30b12 100644 --- a/src/XMLSchema/XML/LocalAttribute.php +++ b/src/XMLSchema/XML/LocalAttribute.php @@ -24,8 +24,7 @@ */ final class LocalAttribute extends AbstractAttribute { - /** @var string */ - public const LOCALNAME = 'attribute'; + public const string LOCALNAME = 'attribute'; /** diff --git a/src/XMLSchema/XML/LocalComplexType.php b/src/XMLSchema/XML/LocalComplexType.php index b847d324..f9281bd7 100644 --- a/src/XMLSchema/XML/LocalComplexType.php +++ b/src/XMLSchema/XML/LocalComplexType.php @@ -24,8 +24,7 @@ */ final class LocalComplexType extends AbstractLocalComplexType { - /** @var string */ - public const LOCALNAME = 'complexType'; + public const string LOCALNAME = 'complexType'; /** diff --git a/src/XMLSchema/XML/LocalElement.php b/src/XMLSchema/XML/LocalElement.php index 5b3af413..8b27eab6 100644 --- a/src/XMLSchema/XML/LocalElement.php +++ b/src/XMLSchema/XML/LocalElement.php @@ -29,8 +29,7 @@ */ final class LocalElement extends AbstractLocalElement implements NestedParticleInterface { - /** @var string */ - public const LOCALNAME = 'element'; + public const string LOCALNAME = 'element'; /** diff --git a/src/XMLSchema/XML/LocalSimpleType.php b/src/XMLSchema/XML/LocalSimpleType.php index e0714224..c48acf0b 100644 --- a/src/XMLSchema/XML/LocalSimpleType.php +++ b/src/XMLSchema/XML/LocalSimpleType.php @@ -24,8 +24,7 @@ */ final class LocalSimpleType extends AbstractLocalSimpleType { - /** @var string */ - public const LOCALNAME = 'simpleType'; + public const string LOCALNAME = 'simpleType'; /** diff --git a/src/XMLSchema/XML/MaxExclusive.php b/src/XMLSchema/XML/MaxExclusive.php index 9f858f4b..3161fbbf 100644 --- a/src/XMLSchema/XML/MaxExclusive.php +++ b/src/XMLSchema/XML/MaxExclusive.php @@ -27,8 +27,7 @@ final class MaxExclusive extends AbstractFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'maxExclusive'; + public const string LOCALNAME = 'maxExclusive'; /** diff --git a/src/XMLSchema/XML/MaxInclusive.php b/src/XMLSchema/XML/MaxInclusive.php index 1417010d..bc8402f8 100644 --- a/src/XMLSchema/XML/MaxInclusive.php +++ b/src/XMLSchema/XML/MaxInclusive.php @@ -27,8 +27,7 @@ final class MaxInclusive extends AbstractFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'maxInclusive'; + public const string LOCALNAME = 'maxInclusive'; /** diff --git a/src/XMLSchema/XML/MaxLength.php b/src/XMLSchema/XML/MaxLength.php index 40057abd..46f73593 100644 --- a/src/XMLSchema/XML/MaxLength.php +++ b/src/XMLSchema/XML/MaxLength.php @@ -18,6 +18,5 @@ final class MaxLength extends AbstractNumFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'maxLength'; + public const string LOCALNAME = 'maxLength'; } diff --git a/src/XMLSchema/XML/MinExclusive.php b/src/XMLSchema/XML/MinExclusive.php index 947f4c97..47e7e7ae 100644 --- a/src/XMLSchema/XML/MinExclusive.php +++ b/src/XMLSchema/XML/MinExclusive.php @@ -27,8 +27,7 @@ final class MinExclusive extends AbstractFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'minExclusive'; + public const string LOCALNAME = 'minExclusive'; /** diff --git a/src/XMLSchema/XML/MinInclusive.php b/src/XMLSchema/XML/MinInclusive.php index d1190314..7dbfa268 100644 --- a/src/XMLSchema/XML/MinInclusive.php +++ b/src/XMLSchema/XML/MinInclusive.php @@ -27,8 +27,7 @@ final class MinInclusive extends AbstractFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'minInclusive'; + public const string LOCALNAME = 'minInclusive'; /** diff --git a/src/XMLSchema/XML/MinLength.php b/src/XMLSchema/XML/MinLength.php index 9ae95664..d9a1f2db 100644 --- a/src/XMLSchema/XML/MinLength.php +++ b/src/XMLSchema/XML/MinLength.php @@ -18,6 +18,5 @@ final class MinLength extends AbstractNumFacet implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'minLength'; + public const string LOCALNAME = 'minLength'; } diff --git a/src/XMLSchema/XML/NamedAttributeGroup.php b/src/XMLSchema/XML/NamedAttributeGroup.php index 7c6ef263..960b7566 100644 --- a/src/XMLSchema/XML/NamedAttributeGroup.php +++ b/src/XMLSchema/XML/NamedAttributeGroup.php @@ -31,8 +31,7 @@ final class NamedAttributeGroup extends AbstractNamedAttributeGroup implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'attributeGroup'; + public const string LOCALNAME = 'attributeGroup'; /** diff --git a/src/XMLSchema/XML/NamedGroup.php b/src/XMLSchema/XML/NamedGroup.php index f92f1b81..376d441a 100644 --- a/src/XMLSchema/XML/NamedGroup.php +++ b/src/XMLSchema/XML/NamedGroup.php @@ -33,8 +33,7 @@ final class NamedGroup extends AbstractNamedGroup implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'group'; + public const string LOCALNAME = 'group'; /** diff --git a/src/XMLSchema/XML/NarrowMaxMinElement.php b/src/XMLSchema/XML/NarrowMaxMinElement.php index 85ab711a..2ebfa288 100644 --- a/src/XMLSchema/XML/NarrowMaxMinElement.php +++ b/src/XMLSchema/XML/NarrowMaxMinElement.php @@ -29,8 +29,7 @@ */ final class NarrowMaxMinElement extends AbstractNarrowMaxMin implements NestedParticleInterface { - /** @var string */ - public const LOCALNAME = 'element'; + public const string LOCALNAME = 'element'; /** diff --git a/src/XMLSchema/XML/Notation.php b/src/XMLSchema/XML/Notation.php index d7cff5f8..d59754b4 100644 --- a/src/XMLSchema/XML/Notation.php +++ b/src/XMLSchema/XML/Notation.php @@ -30,8 +30,7 @@ final class Notation extends AbstractAnnotated implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'notation'; + public const string LOCALNAME = 'notation'; /** diff --git a/src/XMLSchema/XML/Pattern.php b/src/XMLSchema/XML/Pattern.php index 51dcaee2..09280a04 100644 --- a/src/XMLSchema/XML/Pattern.php +++ b/src/XMLSchema/XML/Pattern.php @@ -18,6 +18,5 @@ final class Pattern extends AbstractNoFixedFacet implements SchemaValidatableEle use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'pattern'; + public const string LOCALNAME = 'pattern'; } diff --git a/src/XMLSchema/XML/Redefine.php b/src/XMLSchema/XML/Redefine.php index 185736d8..40c6448f 100644 --- a/src/XMLSchema/XML/Redefine.php +++ b/src/XMLSchema/XML/Redefine.php @@ -28,8 +28,7 @@ final class Redefine extends AbstractOpenAttrs implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'redefine'; + public const string LOCALNAME = 'redefine'; /** diff --git a/src/XMLSchema/XML/ReferencedAttributeGroup.php b/src/XMLSchema/XML/ReferencedAttributeGroup.php index f7248210..779e515b 100644 --- a/src/XMLSchema/XML/ReferencedAttributeGroup.php +++ b/src/XMLSchema/XML/ReferencedAttributeGroup.php @@ -21,8 +21,7 @@ */ final class ReferencedAttributeGroup extends AbstractReferencedAttributeGroup { - /** @var string */ - public const LOCALNAME = 'attributeGroup'; + public const string LOCALNAME = 'attributeGroup'; /** diff --git a/src/XMLSchema/XML/ReferencedGroup.php b/src/XMLSchema/XML/ReferencedGroup.php index 7d1a6bcc..84d991df 100644 --- a/src/XMLSchema/XML/ReferencedGroup.php +++ b/src/XMLSchema/XML/ReferencedGroup.php @@ -26,8 +26,7 @@ final class ReferencedGroup extends AbstractReferencedGroup implements NestedParticleInterface, TypeDefParticleInterface { - /** @var string */ - public const LOCALNAME = 'group'; + public const string LOCALNAME = 'group'; /** diff --git a/src/XMLSchema/XML/Restriction.php b/src/XMLSchema/XML/Restriction.php index ca2034c5..0ea36675 100644 --- a/src/XMLSchema/XML/Restriction.php +++ b/src/XMLSchema/XML/Restriction.php @@ -32,8 +32,7 @@ final class Restriction extends AbstractAnnotated implements use SimpleRestrictionModelTrait; - /** @var string */ - public const LOCALNAME = 'restriction'; + public const string LOCALNAME = 'restriction'; /** diff --git a/src/XMLSchema/XML/Schema.php b/src/XMLSchema/XML/Schema.php index 0427c2e9..cd9588c0 100644 --- a/src/XMLSchema/XML/Schema.php +++ b/src/XMLSchema/XML/Schema.php @@ -35,11 +35,10 @@ final class Schema extends AbstractOpenAttrs implements SchemaValidatableElement use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'schema'; + public const string LOCALNAME = 'schema'; /** The exclusions for the xs:anyAttribute element */ - public const XS_ANY_ATTR_EXCLUSIONS = [ + public const array XS_ANY_ATTR_EXCLUSIONS = [ [C_XML::NS_XML, 'lang'], ]; diff --git a/src/XMLSchema/XML/Selector.php b/src/XMLSchema/XML/Selector.php index c592d640..feb2b024 100644 --- a/src/XMLSchema/XML/Selector.php +++ b/src/XMLSchema/XML/Selector.php @@ -26,11 +26,9 @@ final class Selector extends AbstractAnnotated implements SchemaValidatableEleme use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'selector'; + public const string LOCALNAME = 'selector'; - /** @var string */ public static string $selector_regex = '/^ ( (\.\/\/)? diff --git a/src/XMLSchema/XML/Sequence.php b/src/XMLSchema/XML/Sequence.php index 8a3c8172..514de94c 100644 --- a/src/XMLSchema/XML/Sequence.php +++ b/src/XMLSchema/XML/Sequence.php @@ -35,8 +35,7 @@ final class Sequence extends AbstractExplicitGroup implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'sequence'; + public const string LOCALNAME = 'sequence'; /** diff --git a/src/XMLSchema/XML/SimpleChoice.php b/src/XMLSchema/XML/SimpleChoice.php index 01be8541..d2df95cf 100644 --- a/src/XMLSchema/XML/SimpleChoice.php +++ b/src/XMLSchema/XML/SimpleChoice.php @@ -25,8 +25,7 @@ */ final class SimpleChoice extends AbstractSimpleExplicitGroup { - /** @var string */ - public const LOCALNAME = 'choice'; + public const string LOCALNAME = 'choice'; /** diff --git a/src/XMLSchema/XML/SimpleContent.php b/src/XMLSchema/XML/SimpleContent.php index c31af3d4..1fdd7ab6 100644 --- a/src/XMLSchema/XML/SimpleContent.php +++ b/src/XMLSchema/XML/SimpleContent.php @@ -24,8 +24,7 @@ final class SimpleContent extends AbstractAnnotated implements SchemaValidatable use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'simpleContent'; + public const string LOCALNAME = 'simpleContent'; /** diff --git a/src/XMLSchema/XML/SimpleExtension.php b/src/XMLSchema/XML/SimpleExtension.php index 6c5f0e2f..416c7901 100644 --- a/src/XMLSchema/XML/SimpleExtension.php +++ b/src/XMLSchema/XML/SimpleExtension.php @@ -21,8 +21,7 @@ */ final class SimpleExtension extends AbstractSimpleExtensionType { - /** @var string */ - public const LOCALNAME = 'extension'; + public const string LOCALNAME = 'extension'; /** diff --git a/src/XMLSchema/XML/SimpleRestriction.php b/src/XMLSchema/XML/SimpleRestriction.php index 39e31440..38699aa5 100644 --- a/src/XMLSchema/XML/SimpleRestriction.php +++ b/src/XMLSchema/XML/SimpleRestriction.php @@ -21,8 +21,7 @@ */ final class SimpleRestriction extends AbstractSimpleRestrictionType { - /** @var string */ - public const LOCALNAME = 'restriction'; + public const string LOCALNAME = 'restriction'; /** diff --git a/src/XMLSchema/XML/SimpleSequence.php b/src/XMLSchema/XML/SimpleSequence.php index ce5f7154..d4997cc0 100644 --- a/src/XMLSchema/XML/SimpleSequence.php +++ b/src/XMLSchema/XML/SimpleSequence.php @@ -23,8 +23,7 @@ */ final class SimpleSequence extends AbstractSimpleExplicitGroup { - /** @var string */ - public const LOCALNAME = 'sequence'; + public const string LOCALNAME = 'sequence'; /** diff --git a/src/XMLSchema/XML/TopLevelAttribute.php b/src/XMLSchema/XML/TopLevelAttribute.php index 126fe0e9..fb4a0c06 100644 --- a/src/XMLSchema/XML/TopLevelAttribute.php +++ b/src/XMLSchema/XML/TopLevelAttribute.php @@ -33,8 +33,7 @@ final class TopLevelAttribute extends AbstractTopLevelAttribute implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'attribute'; + public const string LOCALNAME = 'attribute'; /** diff --git a/src/XMLSchema/XML/TopLevelComplexType.php b/src/XMLSchema/XML/TopLevelComplexType.php index bceca980..0698900e 100644 --- a/src/XMLSchema/XML/TopLevelComplexType.php +++ b/src/XMLSchema/XML/TopLevelComplexType.php @@ -31,8 +31,7 @@ final class TopLevelComplexType extends AbstractTopLevelComplexType implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'complexType'; + public const string LOCALNAME = 'complexType'; /** diff --git a/src/XMLSchema/XML/TopLevelElement.php b/src/XMLSchema/XML/TopLevelElement.php index b2fba0b0..c9074b1b 100644 --- a/src/XMLSchema/XML/TopLevelElement.php +++ b/src/XMLSchema/XML/TopLevelElement.php @@ -32,8 +32,7 @@ final class TopLevelElement extends AbstractTopLevelElement implements SchemaVal use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'element'; + public const string LOCALNAME = 'element'; /** diff --git a/src/XMLSchema/XML/TopLevelSimpleType.php b/src/XMLSchema/XML/TopLevelSimpleType.php index 44db3d82..9d4fbe77 100644 --- a/src/XMLSchema/XML/TopLevelSimpleType.php +++ b/src/XMLSchema/XML/TopLevelSimpleType.php @@ -31,8 +31,7 @@ final class TopLevelSimpleType extends AbstractTopLevelSimpleType implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'simpleType'; + public const string LOCALNAME = 'simpleType'; /** diff --git a/src/XMLSchema/XML/TotalDigits.php b/src/XMLSchema/XML/TotalDigits.php index bf135396..0f1efbe1 100644 --- a/src/XMLSchema/XML/TotalDigits.php +++ b/src/XMLSchema/XML/TotalDigits.php @@ -27,8 +27,7 @@ final class TotalDigits extends AbstractNumFacet implements SchemaValidatableEle use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'totalDigits'; + public const string LOCALNAME = 'totalDigits'; /** diff --git a/src/XMLSchema/XML/Union.php b/src/XMLSchema/XML/Union.php index 5beeabb5..45461209 100644 --- a/src/XMLSchema/XML/Union.php +++ b/src/XMLSchema/XML/Union.php @@ -36,8 +36,7 @@ final class Union extends AbstractAnnotated implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'union'; + public const string LOCALNAME = 'union'; /** diff --git a/src/XMLSchema/XML/Unique.php b/src/XMLSchema/XML/Unique.php index 1b265581..3a9db1ea 100644 --- a/src/XMLSchema/XML/Unique.php +++ b/src/XMLSchema/XML/Unique.php @@ -27,8 +27,7 @@ final class Unique extends AbstractKeybase implements IdentityConstraintInterfac use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'unique'; + public const string LOCALNAME = 'unique'; /** diff --git a/src/XMLSchema/XML/WhiteSpace.php b/src/XMLSchema/XML/WhiteSpace.php index 7ed5409b..a643eb75 100644 --- a/src/XMLSchema/XML/WhiteSpace.php +++ b/src/XMLSchema/XML/WhiteSpace.php @@ -27,8 +27,7 @@ final class WhiteSpace extends AbstractFacet implements SchemaValidatableElement use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'whiteSpace'; + public const string LOCALNAME = 'whiteSpace'; /** diff --git a/src/XMLSchema/XML/XsInclude.php b/src/XMLSchema/XML/XsInclude.php index 17bd1835..e5af555b 100644 --- a/src/XMLSchema/XML/XsInclude.php +++ b/src/XMLSchema/XML/XsInclude.php @@ -25,8 +25,7 @@ final class XsInclude extends AbstractAnnotated implements SchemaValidatableElem use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'include'; + public const string LOCALNAME = 'include'; /** diff --git a/src/XMLSchema/XML/XsList.php b/src/XMLSchema/XML/XsList.php index 120f65ff..fa815b8c 100644 --- a/src/XMLSchema/XML/XsList.php +++ b/src/XMLSchema/XML/XsList.php @@ -28,8 +28,7 @@ final class XsList extends AbstractAnnotated implements use SchemaValidatableElementTrait; - /** @var string */ - public const LOCALNAME = 'list'; + public const string LOCALNAME = 'list'; /** diff --git a/src/XPath/Constants.php b/src/XPath/Constants.php index 7592b836..53362105 100644 --- a/src/XPath/Constants.php +++ b/src/XPath/Constants.php @@ -14,10 +14,10 @@ class Constants extends \SimpleSAML\XML\Constants /** * The namespace for the XML Path Language 1.0 */ - public const XPATH10_URI = 'http://www.w3.org/TR/1999/REC-xpath-19991116'; + public const string XPATH10_URI = 'http://www.w3.org/TR/1999/REC-xpath-19991116'; /** @var array */ - public const ALL_AXES = [ + public const array ALL_AXES = [ 'ancestor', 'ancestor-or-self', 'attribute', @@ -34,7 +34,7 @@ class Constants extends \SimpleSAML\XML\Constants ]; /** @var array */ - public const DEFAULT_ALLOWED_AXES = [ + public const array DEFAULT_ALLOWED_AXES = [ 'ancestor', 'ancestor-or-self', 'attribute', @@ -51,7 +51,7 @@ class Constants extends \SimpleSAML\XML\Constants ]; /** @var array */ - public const ALL_FUNCTIONS = [ + public const array ALL_FUNCTIONS = [ 'boolean', 'ceiling', 'concat', @@ -83,7 +83,7 @@ class Constants extends \SimpleSAML\XML\Constants ]; /** @var array */ - public const DEFAULT_ALLOWED_FUNCTIONS = [ + public const array DEFAULT_ALLOWED_FUNCTIONS = [ // 'boolean', // 'ceiling', // 'concat', @@ -114,6 +114,5 @@ class Constants extends \SimpleSAML\XML\Constants // 'true', ]; - /** @var int */ - public const XPATH_FILTER_MAX_LENGTH = 100; + public const int XPATH_FILTER_MAX_LENGTH = 100; } diff --git a/src/XPath/XPath.php b/src/XPath/XPath.php index 9fbacbd1..d1b4575f 100644 --- a/src/XPath/XPath.php +++ b/src/XPath/XPath.php @@ -54,7 +54,6 @@ public static function findElement(DOMNode $ref, string $name): DOMElement|false * * @param \DOMNode $node The associated node * @param bool $autoregister Whether to auto-register all namespaces used in the document - * @return \DOMXPath */ public static function getXPath(DOMNode $node, bool $autoregister = false): DOMXPath { diff --git a/src/XPath/XPathFilter.php b/src/XPath/XPathFilter.php index ecc34636..c4a018b9 100644 --- a/src/XPath/XPathFilter.php +++ b/src/XPath/XPathFilter.php @@ -24,7 +24,6 @@ class XPathFilter * Remove the content from all single or double-quoted strings in $input, leaving only quotes. * * @param string $input - * @return string * @throws \SimpleSAML\XPath\Exception\RuntimeException */ public static function removeStringContents(string $input): string diff --git a/tests/Helper/Base64BinaryElement.php b/tests/Helper/Base64BinaryElement.php index 0155fb58..d3a51a6a 100644 --- a/tests/Helper/Base64BinaryElement.php +++ b/tests/Helper/Base64BinaryElement.php @@ -20,17 +20,13 @@ final class Base64BinaryElement extends AbstractElement implements SchemaValidat use SchemaValidatableElementTrait; - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; - /** @var string */ - public const SCHEMA = 'tests/resources/schemas/deliberately-wrong-file.xsd'; + public const string SCHEMA = 'tests/resources/schemas/deliberately-wrong-file.xsd'; - /** @var string */ - public const TEXTCONTENT_TYPE = AbstractElement::class; // Deliberately wrong class + public const string TEXTCONTENT_TYPE = AbstractElement::class; // Deliberately wrong class /** diff --git a/tests/Helper/BooleanElement.php b/tests/Helper/BooleanElement.php index 69398fae..27914f53 100644 --- a/tests/Helper/BooleanElement.php +++ b/tests/Helper/BooleanElement.php @@ -21,15 +21,11 @@ final class BooleanElement extends AbstractElement implements SchemaValidatableE use TypedTextContentTrait; - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; - /** @var string */ - public const SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; + public const string SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; - /** @var string */ - public const TEXTCONTENT_TYPE = BooleanValue::class; + public const string TEXTCONTENT_TYPE = BooleanValue::class; } diff --git a/tests/Helper/Element.php b/tests/Helper/Element.php index 09588eac..38839fb7 100644 --- a/tests/Helper/Element.php +++ b/tests/Helper/Element.php @@ -22,11 +22,9 @@ */ final class Element extends AbstractElement { - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; /** diff --git a/tests/Helper/ExtendableAttributesElement.php b/tests/Helper/ExtendableAttributesElement.php index 33e70f3f..ddfa8c11 100644 --- a/tests/Helper/ExtendableAttributesElement.php +++ b/tests/Helper/ExtendableAttributesElement.php @@ -25,23 +25,18 @@ class ExtendableAttributesElement extends AbstractElement implements SchemaValid use SchemaValidatableElementTrait; - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; - /** @var string */ - public const LOCALNAME = 'ExtendableAttributesElement'; + public const string LOCALNAME = 'ExtendableAttributesElement'; - /** @var string */ - public const SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; + public const string SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; - /** @var string[]|string */ - final public const XS_ANY_ATTR_NAMESPACE = NS::ANY; + final public const string XS_ANY_ATTR_NAMESPACE = NS::ANY; /** @var array{array{string, string}} */ - final public const XS_ANY_ATTR_EXCLUSIONS = [ + final public const array XS_ANY_ATTR_EXCLUSIONS = [ ['urn:x-simplesamlphp:namespace', 'attr3'], ]; diff --git a/tests/Helper/ExtendableElement.php b/tests/Helper/ExtendableElement.php index fad86c35..cade25b5 100644 --- a/tests/Helper/ExtendableElement.php +++ b/tests/Helper/ExtendableElement.php @@ -25,23 +25,18 @@ class ExtendableElement extends AbstractElement implements SchemaValidatableElem use SerializableElementTrait; - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; - /** @var string */ - public const LOCALNAME = 'ExtendableElement'; + public const string LOCALNAME = 'ExtendableElement'; - /** @var string */ - public const SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; + public const string SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; - /** @var string[]|string */ - final public const XS_ANY_ELT_NAMESPACE = NS::ANY; + final public const string XS_ANY_ELT_NAMESPACE = NS::ANY; /** @var array{array{string, string}} */ - final public const XS_ANY_ELT_EXCLUSIONS = [ + final public const array XS_ANY_ELT_EXCLUSIONS = [ ['urn:custom:other', 'Chunk'], ]; diff --git a/tests/Helper/StringElement.php b/tests/Helper/StringElement.php index 3fe149e4..8aa4eb44 100644 --- a/tests/Helper/StringElement.php +++ b/tests/Helper/StringElement.php @@ -21,15 +21,11 @@ final class StringElement extends AbstractElement implements SchemaValidatableEl use TypedTextContentTrait; - /** @var string */ - public const NS = 'urn:x-simplesamlphp:namespace'; + public const string NS = 'urn:x-simplesamlphp:namespace'; - /** @var string */ - public const NS_PREFIX = 'ssp'; + public const string NS_PREFIX = 'ssp'; - /** @var string */ - public const SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; + public const string SCHEMA = 'tests/resources/schemas/simplesamlphp.xsd'; - /** @var string */ - public const TEXTCONTENT_TYPE = StringValue::class; + public const string TEXTCONTENT_TYPE = StringValue::class; } diff --git a/tests/Helper/XMLDumper.php b/tests/Helper/XMLDumper.php index 94ebe812..2f918b1a 100644 --- a/tests/Helper/XMLDumper.php +++ b/tests/Helper/XMLDumper.php @@ -19,8 +19,10 @@ public static function dumpDOMDocumentXMLWithBase64Content(DOMDocument $document { /** @var string $dump */ $dump = $document->saveXML($document->documentElement); + /** @var string $result */ $result = preg_replace('/ *[\\r\\n] */', '', $dump); + return $result; } } From 91a7b38f296305715e5141aab14c94a4c1f7d67d Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 16 Dec 2025 20:52:03 +0100 Subject: [PATCH 2/6] Fix CI --- src/XML/XML/Trait/SpecialAttrsTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/XML/XML/Trait/SpecialAttrsTrait.php b/src/XML/XML/Trait/SpecialAttrsTrait.php index cc2469fa..ae9ccc9a 100644 --- a/src/XML/XML/Trait/SpecialAttrsTrait.php +++ b/src/XML/XML/Trait/SpecialAttrsTrait.php @@ -23,28 +23,28 @@ trait SpecialAttrsTrait * * @var \SimpleSAML\XML\Type\BaseValue|null */ - protected readonly ?BaseValue $base = null; + protected readonly ?BaseValue $base; /** * The id. * * @var \SimpleSAML\XML\Type\IDValue|null */ - protected readonly ?IDValue $id = null; + protected readonly ?IDValue $id; /** * The lang. * * @var \SimpleSAML\XML\Type\LangValue|null */ - protected readonly ?LangValue $lang = null; + protected readonly ?LangValue $lang; /** * The space. * * @var \SimpleSAML\XML\Type\SpaceValue|null */ - protected readonly ?SpaceValue $space = null; + protected readonly ?SpaceValue $space; /** From 896810625f8d2940c77c77cd606d3205ba1f115a Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 16 Dec 2025 20:57:14 +0100 Subject: [PATCH 3/6] Bump test-framework --- .github/workflows/php.yml | 12 ++++++------ composer.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index afe14a76..74034efc 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 @@ -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 @@ -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, libxml, pcre, spl, xml tools: composer coverage: none diff --git a/composer.json b/composer.json index 46b0e18e..dcdecc1d 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "simplesamlphp/composer-xmlprovider-installer": "~1.2" }, "require-dev": { - "simplesamlphp/simplesamlphp-test-framework": "~1.10" + "simplesamlphp/simplesamlphp-test-framework": "~1.11" }, "support": { "issues": "https://github.com/simplesamlphp/xml-common/issues", From 789f0a6fefe105f9d1d8241dfae29f7973f45526 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 16 Dec 2025 23:01:20 +0100 Subject: [PATCH 4/6] Add ext-intl for composer-require-checker --- .github/workflows/php.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 74034efc..1e8a6a6b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -53,7 +53,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, date, dom, filter, libxml, pcre, spl, xml, xmlreader + extensions: ctype, date, dom, filter, intl, libxml, pcre, spl, xml, xmlreader tools: composer ini-values: error_reporting=E_ALL coverage: pcov @@ -115,7 +115,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, date, dom, filter, libxml, pcre, spl, xml, xmlreader + extensions: ctype, date, dom, filter, intl, libxml, pcre, spl, xml, xmlreader 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, date, dom, filter, libxml, pcre, spl, xml + extensions: ctype, date, dom, filter, intl, libxml, pcre, spl, xml coverage: none - name: Setup problem matchers for PHP From d924db23afc12e8ed8bc1327d07804343585505c Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Wed, 17 Dec 2025 00:09:32 +0100 Subject: [PATCH 5/6] Add ext-intl for composer-require-checker --- .github/workflows/php.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 1e8a6a6b..c9b7722b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -53,7 +53,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, date, dom, filter, intl, libxml, pcre, spl, xml, xmlreader + extensions: ctype, date, dom, filter, intl, libxml, pcre, sodium, spl, xml, xmlreader tools: composer ini-values: error_reporting=E_ALL coverage: pcov @@ -115,7 +115,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, date, dom, filter, intl, libxml, pcre, spl, xml, xmlreader + extensions: ctype, date, dom, filter, intl, libxml, pcre, sodium, spl, xml, xmlreader 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, date, dom, filter, intl, libxml, pcre, spl, xml + extensions: ctype, date, dom, filter, intl, libxml, pcre, sodium, spl, xml coverage: none - name: Setup problem matchers for PHP From 4d3b0a389d650567dfae9bac54fcde359fbc4125 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Wed, 17 Dec 2025 00:10:50 +0100 Subject: [PATCH 6/6] Typed constants --- src/XMLSchema/Type/Interface/AbstractAnySimpleType.php | 9 +++------ src/XMLSchema/XML/Constants/NS.php | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/XMLSchema/Type/Interface/AbstractAnySimpleType.php b/src/XMLSchema/Type/Interface/AbstractAnySimpleType.php index 6d6b1245..f818610a 100644 --- a/src/XMLSchema/Type/Interface/AbstractAnySimpleType.php +++ b/src/XMLSchema/Type/Interface/AbstractAnySimpleType.php @@ -16,14 +16,11 @@ */ abstract class AbstractAnySimpleType implements ValueTypeInterface { - /** @var string */ - public const SCHEMA_TYPE = 'anySimpleType'; + public const string SCHEMA_TYPE = 'anySimpleType'; - /** @var string */ - public const SCHEMA_NAMESPACEURI = 'http://www.w3.org/2001/XMLSchema'; + public const string SCHEMA_NAMESPACEURI = 'http://www.w3.org/2001/XMLSchema'; - /** @var string */ - public const SCHEMA_NAMESPACE_PREFIX = 'xs'; + public const string SCHEMA_NAMESPACE_PREFIX = 'xs'; /** diff --git a/src/XMLSchema/XML/Constants/NS.php b/src/XMLSchema/XML/Constants/NS.php index 571cc476..aff751b5 100644 --- a/src/XMLSchema/XML/Constants/NS.php +++ b/src/XMLSchema/XML/Constants/NS.php @@ -6,13 +6,13 @@ final class NS { - public const ANY = '##any'; + public const string ANY = '##any'; - public const LOCAL = '##local'; + public const string LOCAL = '##local'; - public const OTHER = '##other'; + public const string OTHER = '##other'; - public const TARGETNAMESPACE = '##targetNamespace'; + public const string TARGETNAMESPACE = '##targetNamespace'; /** @var string[] */