mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 01:32:22 +01:00
Update PostRepository.php
sprintf function in findById method was missing second argument.
This commit is contained in:
parent
257ec81336
commit
fadf0f15cf
@ -28,7 +28,7 @@ class PostRepository
|
||||
$arrayData = $this->persistence->retrieve($id);
|
||||
|
||||
if (is_null($arrayData)) {
|
||||
throw new \InvalidArgumentException(sprintf('Post with ID %d does not exist'));
|
||||
throw new \InvalidArgumentException(sprintf('Post with ID %d does not exist', $id));
|
||||
}
|
||||
|
||||
return Post::fromState($arrayData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user