mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +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);
|
$arrayData = $this->persistence->retrieve($id);
|
||||||
|
|
||||||
if (is_null($arrayData)) {
|
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);
|
return Post::fromState($arrayData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user