diff --git a/src/Exception/MissingParticipantOfSurveyException.php b/src/Exception/MissingParticipantOfSurveyException.php index 11d7dd1..4f58849 100644 --- a/src/Exception/MissingParticipantOfSurveyException.php +++ b/src/Exception/MissingParticipantOfSurveyException.php @@ -25,7 +25,7 @@ class MissingParticipantOfSurveyException extends \Exception public function __construct($surveyId, $email) { $template = 'Participant with e-mail %s of survey with ID %s is missing. Maybe was not added to the survey?'; - $message = sprintf($template, $surveyId, $email); + $message = sprintf($template, $email, $surveyId); parent::__construct($message); } diff --git a/tests/Exception/MissingParticipantOfSurveyExceptionTest.php b/tests/Exception/MissingParticipantOfSurveyExceptionTest.php index 5ba04c6..88419c3 100644 --- a/tests/Exception/MissingParticipantOfSurveyExceptionTest.php +++ b/tests/Exception/MissingParticipantOfSurveyExceptionTest.php @@ -45,13 +45,13 @@ class MissingParticipantOfSurveyExceptionTest extends BaseTestCase yield[ 1, 'lorem@ipsum.com', - sprintf($template, 1, 'lorem@ipsum.com'), + sprintf($template, 'lorem@ipsum.com', 1), ]; yield[ 1234, 'another@email.comm', - sprintf($template, 1234, 'another@email.comm'), + sprintf($template, 'another@email.comm', 1234), ]; } }