Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd7ee48

Browse files
author
Dominik Liebler
authored
Merge pull request DesignPatternsPHP#244 from diwipl/patch-1
Update PostRepository.php
2 parents 257ec81 + fadf0f1 commit dd7ee48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

More/Repository/PostRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function findById(int $id): Post
2828
$arrayData = $this->persistence->retrieve($id);
2929

3030
if (is_null($arrayData)) {
31-
throw new \InvalidArgumentException(sprintf('Post with ID %d does not exist'));
31+
throw new \InvalidArgumentException(sprintf('Post with ID %d does not exist', $id));
3232
}
3333

3434
return Post::fromState($arrayData);

0 commit comments

Comments
 (0)