From 92306c8a1293785110e962ab7a9fb526e6f9faf9 Mon Sep 17 00:00:00 2001 From: Carlos Buenosvinos Date: Sat, 19 Mar 2022 01:56:07 +0100 Subject: [PATCH] Resync --- .../CountFollowersProjectionHandler.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/Cheeper/Chapter8/Application/Author/Projection/CountFollowersProjectionHandler.php 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