diff --git a/src/Cheeper/Chapter8/Application/Author/Projection/CountFollowersProjectionHandler.php b/src/Cheeper/Chapter8/Application/Author/Projection/CountFollowersProjectionHandler.php new file mode 100644 index 0000000..dfc9f57 --- /dev/null +++ b/src/Cheeper/Chapter8/Application/Author/Projection/CountFollowersProjectionHandler.php @@ -0,0 +1,31 @@ +redis->hIncrBy( + sprintf( + CreateFollowersCounterProjectionHandler::REDIS_KEY_TEMPLATE, + $projection->authorId() + ), + 'followers', + 1 + ); + } +} +//end-snippet