Skip to content

Commit

Permalink
chore: Ensure exception messages end in a period.
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jan 14, 2024
1 parent 638e8ca commit 2d178b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(array $sourceTypes, array $targetTypes, Context $con
$targetTypes = TypeUtil::getDebugType($targetTypes);

parent::__construct(
sprintf('Cannot find a matching transformer for mapping the source types "%s" to the target types "%s"', $sourceTypes, $sourceTypes),
sprintf('Cannot find a matching transformer for mapping the source types "%s" to the target types "%s".', $sourceTypes, $sourceTypes),
context: $context
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TransformerReturnsUnexpectedValueException extends UnexpectedValueExceptio
public function __construct(Type|MixedType $type, mixed $target, Context $context)
{
$message = sprintf(
'Mapper returns unexpected value. Expected type "%s", but got "%s"',
'Mapper returns unexpected value. Expected type "%s", but got "%s".',
TypeUtil::getTypeString($type),
get_debug_type($target),
);
Expand Down
2 changes: 1 addition & 1 deletion src/ObjectCache/Exception/CircularReferenceException.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(mixed $source, Type $targetType, Context $context =
{
parent::__construct(
sprintf(
'Circular reference detected when trying to get the object of type "%s" transformed to "%s"',
'Circular reference detected when trying to get the object of type "%s" transformed to "%s".',
\get_debug_type($source),
TypeUtil::getDebugType($targetType)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
) {
parent::__construct(
message: sprintf(
'Trying to map to a class with an inheritance map, but source class "%s" is not found in the "%s" attribute of the target class "%s"',
'Trying to map to a class with an inheritance map, but source class "%s" is not found in the "%s" attribute of the target class "%s".',
$sourceClass,
InheritanceMap::class,
$targetClass
Expand Down

0 comments on commit 2d178b2

Please sign in to comment.