mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 04:00:18 +02:00
Update PostRepository.php
sprintf function in findById method was missing second argument.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user