From d96e30ec807a38beea23dddcd9ea30f94de8bc52 Mon Sep 17 00:00:00 2001 From: Reedy Date: Wed, 24 Jan 2024 22:11:52 +0000 Subject: [PATCH] LoginNotify: Simplify returns in getMinExpiredId() Follows-Up: Iea716e660353f16c47f873fe42edc2aeec1b4346 Change-Id: Ie351a210eea4eaf4101930fb18e6e149d4294ab4 --- includes/LoginNotify.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/LoginNotify.php b/includes/LoginNotify.php index 5d17075..ce862a1 100644 --- a/includes/LoginNotify.php +++ b/includes/LoginNotify.php @@ -808,13 +808,12 @@ class LoginNotify implements LoggerAwareInterface { ->limit( 1 ) ->caller( __METHOD__ ) ->fetchRow(); - if ( !$minRow ) { - return null; - } elseif ( $minRow->lsn_time_bucket < $this->getMinBucket() ) { + + if ( $minRow && ( $minRow->lsn_time_bucket < $this->getMinBucket() ) ) { return (int)$minRow->lsn_id; - } else { - return null; } + + return null; } /**