Skip to content

Commit f4aaeeb

Browse files
committed
typed constants
1 parent faa3768 commit f4aaeeb

File tree

189 files changed

+184
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+184
-528
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
}
3333
},
3434
"require": {
35-
"php": "^8.2",
35+
"php": "^8.3",
3636

3737
"ext-bcmath": "*",
3838
"ext-date": "*",

src/XML/AbstractElement.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
*
2626
* @package simplesamlphp/xml-common
2727
*/
28-
abstract class AbstractElement implements SerializableElementInterface
28+
abstract class AbstractElement implements
29+
SerializableElementInterface,
30+
ElementInterface
2931
{
3032
use SerializableElementTrait;
3133

@@ -34,7 +36,6 @@ abstract class AbstractElement implements SerializableElementInterface
3436
* Create a document structure for this element
3537
*
3638
* @param \DOMElement|null $parent The element we should append to.
37-
* @return \DOMElement
3839
*/
3940
public function instantiateParentElement(?DOMElement $parent = null): DOMElement
4041
{
@@ -117,7 +118,6 @@ public static function getOptionalAttribute(
117118
* Static method that processes a fully namespaced class name and returns the name of the class from it.
118119
*
119120
* @param string $class
120-
* @return string
121121
*/
122122
public static function getClassName(string $class): string
123123
{
@@ -129,8 +129,6 @@ public static function getClassName(string $class): string
129129

130130
/**
131131
* Get the XML qualified name (prefix:name) of the element represented by this class.
132-
*
133-
* @return string
134132
*/
135133
public function getQualifiedName(): string
136134
{
@@ -166,8 +164,6 @@ public static function getChildrenOfClass(DOMElement $parent): array
166164

167165
/**
168166
* Get the namespace for the element.
169-
*
170-
* @return string|null
171167
*/
172168
public static function getNamespaceURI(): ?string
173169
{
@@ -187,8 +183,6 @@ public static function getNamespaceURI(): ?string
187183

188184
/**
189185
* Get the namespace-prefix for the element.
190-
*
191-
* @return string
192186
*/
193187
public static function getNamespacePrefix(): string
194188
{
@@ -206,8 +200,6 @@ public static function getNamespacePrefix(): string
206200

207201
/**
208202
* Get the local name for the element.
209-
*
210-
* @return string
211203
*/
212204
public static function getLocalName(): string
213205
{
@@ -224,8 +216,6 @@ public static function getLocalName(): string
224216

225217
/**
226218
* Whether the element may be normalized.
227-
*
228-
* @return bool
229219
*/
230220
public static function getNormalization(): bool
231221
{
@@ -244,7 +234,6 @@ public static function getNormalization(): bool
244234
* Test if an object, at the state it's in, would produce an empty XML-element
245235
*
246236
* @codeCoverageIgnore
247-
* @return bool
248237
*/
249238
public function isEmptyElement(): bool
250239
{

src/XML/ArrayizableElementInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ interface ArrayizableElementInterface
1515
* Create a class from an array
1616
*
1717
* @param array<string, mixed> $data
18-
* @return static
1918
*/
2019
public static function fromArray(array $data): static;
2120

src/XML/Assert/ByteTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
trait ByteTrait
1313
{
14-
/** @var string */
1514
private static string $byte_regex = '/^
1615
(
1716
(

src/XML/Assert/DateTimeTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ trait DateTimeTrait
3030
* * ss is a two-integer-digit numeral that represents the whole seconds;
3131
* * '.' s+ (if present) represents the fractional seconds;
3232
* * zzzzzz (if present) represents the timezone (as described below).
33-
*
34-
* @var string
3533
*/
3634
private static string $datetime_regex = '/^
3735
-?

src/XML/Assert/DateTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ trait DateTrait
2121
*
2222
* and the least upper bound of the interval is the timeline point represented (noncanonically) by:
2323
* '-' yyyy '-' mm '-' dd 'T24:00:00' zzzzzz?.
24-
*
25-
* @var string
2624
*/
2725
private static string $date_regex = '/^
2826
-?

src/XML/Assert/DayTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ trait DayTrait
1313
{
1414
/**
1515
* Format: ---DD with optional timezone representation
16-
*
17-
* @var string
1816
*/
1917
private static string $day_regex = '/^
2018
---

src/XML/Assert/DecimalTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
trait DecimalTrait
1313
{
14-
/** @var string */
1514
private static string $decimal_regex = '/^[+-]?((\d+(\.\d*)?)|(\.\d+))$/D';
1615

1716

src/XML/Assert/DoubleTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
trait DoubleTrait
1313
{
14-
/** @var string */
1514
private static string $double_regex = '/^
1615
(
1716
([+-]?([0-9]+[.][0-9]*|[.][0-9]+)([e][+-]?[0-9]+)?)

src/XML/Assert/DurationTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
trait DurationTrait
1313
{
14-
/** @var string */
1514
private static string $duration_regex = '/^
1615
([-+]?)
1716
P

0 commit comments

Comments
 (0)