@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return list<\SimpleSAML\XML\SerializableElementInterface> $elements |
| 44 | 44 | */ |
| 45 | - protected static function getChildElementsFromXML(DOMElement $xml, NS|array|null $namespace = null): array |
|
| 45 | + protected static function getChildElementsFromXML(DOMElement $xml, NS | array | null $namespace = null): array |
|
| 46 | 46 | { |
| 47 | 47 | $namespace = $namespace ?? self::XS_ANY_ELT_NAMESPACE; |
| 48 | 48 | $exclusionList = self::getElementExclusions(); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * @param \SimpleSAML\XML\SerializableElementInterface $elt |
| 135 | 135 | * @return string|null |
| 136 | 136 | */ |
| 137 | - function (SerializableElementInterface $elt) { |
|
| 137 | + function(SerializableElementInterface $elt) { |
|
| 138 | 138 | return ($elt instanceof Chunk) ? $elt->getNamespaceURI() : $elt::getNamespaceURI(); |
| 139 | 139 | }, |
| 140 | 140 | $elements, |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | /** |
| 203 | 203 | * @return array|\SimpleSAML\XML\XsNamespace |
| 204 | 204 | */ |
| 205 | - public function getElementNamespace(): array|NS |
|
| 205 | + public function getElementNamespace(): array | NS |
|
| 206 | 206 | { |
| 207 | 207 | Assert::true( |
| 208 | 208 | defined('self::XS_ANY_ELT_NAMESPACE'), |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * |
| 94 | 94 | * @return array<int, \SimpleSAML\XML\Attribute> $attributes |
| 95 | 95 | */ |
| 96 | - protected static function getAttributesNSFromXML(DOMElement $xml, NS|array|null $namespace = null): array |
|
| 96 | + protected static function getAttributesNSFromXML(DOMElement $xml, NS | array | null $namespace = null): array |
|
| 97 | 97 | { |
| 98 | 98 | $namespace = $namespace ?? self::XS_ANY_ATTR_NAMESPACE; |
| 99 | 99 | $exclusionList = self::getAttributeExclusions(); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param \SimpleSAML\XML\Attribute $elt |
| 181 | 181 | * @return string|null |
| 182 | 182 | */ |
| 183 | - function (Attribute $attr) { |
|
| 183 | + function(Attribute $attr) { |
|
| 184 | 184 | return $attr->getNamespaceURI(); |
| 185 | 185 | }, |
| 186 | 186 | $attributes, |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | /** |
| 241 | 241 | * @return array|\SimpleSAML\XML\XsNamespace |
| 242 | 242 | */ |
| 243 | - public function getAttributeNamespace(): array|NS |
|
| 243 | + public function getAttributeNamespace(): array | NS |
|
| 244 | 244 | { |
| 245 | 245 | Assert::true( |
| 246 | 246 | defined('self::XS_ANY_ATTR_NAMESPACE'), |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @var string |
| 18 | 18 | */ |
| 19 | - 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'; |
|
| 19 | + 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'; |
|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @var string |
| 18 | 18 | */ |
| 19 | - private static string $day_regex = '/^ |
|
| 19 | + private static string $day_regex = '/^ |
|
| 20 | 20 | --- |
| 21 | 21 | (0[1-9]|1[1-9]|2[1-9]|3[01]) |
| 22 | 22 | ([+-]([0-1][0-9]|2[0-4]):(0[0-9]|[1-5][0-9])|Z) |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | trait YearMonthTrait |
| 13 | 13 | { |
| 14 | 14 | /** @var string */ |
| 15 | - private static string $yearmonth_regex = '/^ |
|
| 15 | + private static string $yearmonth_regex = '/^ |
|
| 16 | 16 | -? |
| 17 | 17 | ([1-9][0-9]*|[0-9]{4}) |
| 18 | 18 | - |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @var string |
| 26 | 26 | */ |
| 27 | - private static string $date_regex = '/^ |
|
| 27 | + private static string $date_regex = '/^ |
|
| 28 | 28 | -? |
| 29 | 29 | ([1-9][0-9]*|[0-9]{4}) |
| 30 | 30 | - |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | $res = preg_replace( |
| 48 | 48 | '/(["\'])(?:(?!\\1).)*+\\1/', |
| 49 | - "\\1\\1", // Replace the content with two of the quotes that were matched |
|
| 49 | + "\\1\\1", // Replace the content with two of the quotes that were matched |
|
| 50 | 50 | $input, |
| 51 | 51 | ); |
| 52 | 52 | |
@@ -84,7 +84,6 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * Use possessive quantifiers (i.e. *+ and ++ instead of * and + respectively) to prevent backtracking |
| 86 | 86 | * and thus prevent a ReDOS. |
| 87 | - |
|
| 88 | 87 | * '/([a-z]++(?>-[a-z]++)*+)\s*+\(/' |
| 89 | 88 | * ( # Start a capturing group |
| 90 | 89 | * [a-z]++ # Match one or more lower-case alpha characters |
@@ -95,7 +94,7 @@ discard block |
||
| 95 | 94 | * ) # End of the capturing group |
| 96 | 95 | * \s*+ # Match zero or more whitespace characters, possessively |
| 97 | 96 | * \( # Match an opening parenthesis |
| 98 | - */ |
|
| 97 | + */ |
|
| 99 | 98 | |
| 100 | 99 | '/([a-z]++(?>-[a-z]++)*+)\\s*+\\(/', |
| 101 | 100 | $xpathExpression, |
@@ -146,7 +145,7 @@ discard block |
||
| 146 | 145 | * ) # End of the capturing group |
| 147 | 146 | * \s*+ # Match zero or more whitespace characters, possessively |
| 148 | 147 | * \( # Match an opening parenthesis |
| 149 | - */ |
|
| 148 | + */ |
|
| 150 | 149 | |
| 151 | 150 | '/([a-z]++(?>-[a-z]++)*+)\\s*+::/', |
| 152 | 151 | $xpathExpression, |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * @param \SimpleSAML\XML\Type\ValueTypeInterface|string $other |
| 143 | 143 | * @return bool |
| 144 | 144 | */ |
| 145 | - public function equals(ValueTypeInterface|string $other): bool |
|
| 145 | + public function equals(ValueTypeInterface | string $other): bool |
|
| 146 | 146 | { |
| 147 | 147 | if (is_string($other)) { |
| 148 | 148 | $other = static::fromString($other); |