From 3a9e4dfe765b8adc0c2ac355bd397ffcc21a6e4e Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Fri, 31 May 2024 16:53:43 +0200 Subject: [PATCH] Add trailing comma's --- composer.json | 3 ++- src/CustomAssertionTrait.php | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 44113e3..14474cd 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,8 @@ "config": { "allow-plugins": { "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "simplesamlphp/composer-module-installer": false } } } diff --git a/src/CustomAssertionTrait.php b/src/CustomAssertionTrait.php index 7fceb62..ab65166 100644 --- a/src/CustomAssertionTrait.php +++ b/src/CustomAssertionTrait.php @@ -63,7 +63,7 @@ private static function validDuration(string $value, string $message = ''): void if (filter_var($value, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => self::$duration_regex]]) === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid xs:duration', - $value + $value, )); } } @@ -96,7 +96,7 @@ private static function stringPlausibleBase64(string $value, string $message = ' if ($result === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid Base64 encoded string', - $value + $value, )); } } @@ -114,7 +114,7 @@ private static function validDateTime(string $value, string $message = ''): void ) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid DateTime', - $value + $value, )); } } @@ -133,12 +133,12 @@ private static function validDateTimeZulu(string $value, string $message = ''): if ($dateTime === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid DateTime', - $value + $value, )); } elseif ($dateTime->getTimezone()->getName() !== 'Z') { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a DateTime expressed in the UTC timezone using the \'Z\' timezone identifier.', - $value + $value, )); } } @@ -174,7 +174,7 @@ private static function validURN(string $value, string $message = ''): void if (filter_var($value, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => self::$urn_regex]]) === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid RFC8141 compliant URN', - $value + $value, )); } } @@ -189,7 +189,7 @@ private static function validURL(string $value, string $message = ''): void if (filter_var($value, FILTER_VALIDATE_URL) === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid RFC2396 compliant URL', - $value + $value, )); } } @@ -209,7 +209,7 @@ private static function validURI(string $value, string $message = ''): void ) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid RFC3986 compliant URI', - $value + $value, )); } } @@ -224,7 +224,7 @@ private static function validNCName(string $value, string $message = ''): void if (filter_var($value, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => self::$ncname_regex]]) === false) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid non-colonized name (NCName)', - $value + $value, )); } } @@ -242,7 +242,7 @@ private static function validQName(string $value, string $message = ''): void ) { throw new InvalidArgumentException(sprintf( $message ?: '\'%s\' is not a valid qualified name (QName)', - $value + $value, )); } }