Skip to content

Commit

Permalink
Fixed the SimpleBus's using description
Browse files Browse the repository at this point in the history
  • Loading branch information
awd-studio committed Jun 7, 2020
1 parent 8466c1c commit 9d68024
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ $bus = new class(new InMemoryHandlerLocator()) extends \AwdStudio\Bus\SimpleBus
{
// Our parent allows us to iterate all handlers
// that assigned to certain message
foreach ($this->handleAll($message) as $handler) {
// All we need is to feed a handler with a message
$handler($message);
foreach ($this->handleAll($message) as $result) {
echo $result;
}
}
};
Expand Down Expand Up @@ -385,7 +384,7 @@ $bus = new class ($handlerRegistry) extends SimpleBus {
public function handle(object $message): void
{
foreach ($this->handleAll($message) as $result) {
$result($message);
echo $result;
}
}
};
Expand Down

0 comments on commit 9d68024

Please sign in to comment.