]> BookStack Code Mirror - bookstack/commitdiff
Removed redundant null check 4554/head
authorDan Brown <redacted>
Sat, 16 Sep 2023 12:49:03 +0000 (13:49 +0100)
committerDan Brown <redacted>
Sat, 16 Sep 2023 12:49:03 +0000 (13:49 +0100)
app/Activity/Models/View.php

index b593a7d27be74209f746c32c335361f0ac538995..30ead11935ff38449a0eef3b2bf9cf6905180121 100644 (file)
@@ -41,7 +41,7 @@ class View extends Model
     public static function incrementFor(Viewable $viewable): int
     {
         $user = user();
     public static function incrementFor(Viewable $viewable): int
     {
         $user = user();
-        if (is_null($user) || $user->isGuest()) {
+        if ($user->isGuest()) {
             return 0;
         }
 
             return 0;
         }