Skip to content

Commit b967743

Browse files
committed
Explicitly typehint $matches
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
1 parent 9c71cfc commit b967743

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/Saml2/Utils.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ public static function parseDuration($duration, $timestamp = null)
725725

726726
/* Parse the duration. We use a very strict pattern. */
727727
$durationRegEx = '#^(-?)P(?:(?:(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?)|(?:(\\d+)W))$#D';
728+
$matches = [];
728729
if (!preg_match($durationRegEx, $duration, $matches)) {
729730
throw new Exception('Invalid ISO 8601 duration: ' . $duration);
730731
}

0 commit comments

Comments
 (0)