diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index 3a20c672..e3393396 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -815,11 +815,10 @@ public function toMatchObject(iterable $object, string $message = ''): self $propertyValue = $this->value->{$property}; $second_message = $message !== '' ? $message : sprintf( - 'Failed asserting that an object has a property %s with the value %s.', - $this->export($property), - $this->export($propertyValue), - ); - } + 'Failed asserting that an object has a property %s with the value %s.', + $this->export($property), + $this->export($propertyValue), + ); Assert::assertEquals($value, $propertyValue, $second_message); }