From a7e9e1332361a31de6eb94cf1d356500c3a89301 Mon Sep 17 00:00:00 2001 From: Razin Shaikh <46933565+mrazinshaikh@users.noreply.github.com> Date: Sun, 13 Oct 2024 20:41:07 +0530 Subject: [PATCH] [5.x] Added `isEvent` and `isCache` methods to `IncomingEntry` (#1536) * Added isEvent and isCache to IncomingEntry * Update IncomingEntry.php --------- Co-authored-by: mrazinshaikh Co-authored-by: Taylor Otwell --- src/IncomingEntry.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/IncomingEntry.php b/src/IncomingEntry.php index c82afd967..1a19affda 100644 --- a/src/IncomingEntry.php +++ b/src/IncomingEntry.php @@ -222,6 +222,26 @@ public function isSlowQuery() return $this->type === EntryType::QUERY && ($this->content['slow'] ?? false); } + /** + * Determine if the incoming entry is a event entry. + * + * @return bool + */ + public function isEvent() + { + return $this->type === EntryType::EVENT; + } + + /** + * Determine if the incoming entry is a cache entry. + * + * @return bool + */ + public function isCache() + { + return $this->type === EntryType::CACHE; + } + /** * Determine if the incoming entry is an authorization gate check. *