Skip to content

Commit

Permalink
Add trailing comma's
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed May 31, 2024
1 parent 0a5ffa6 commit 3a9e4df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
20 changes: 10 additions & 10 deletions src/CustomAssertionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
}
}
Expand Down Expand Up @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand Down Expand Up @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand All @@ -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,
));
}
}
Expand Down

0 comments on commit 3a9e4df

Please sign in to comment.