From 7d8a01a8ad9ef9cba647c6101c7e1af7746f5399 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Tue, 8 May 2018 22:44:03 +0700 Subject: [PATCH] count() usage optimization --- src/Adapter/DbTable/AbstractAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapter/DbTable/AbstractAdapter.php b/src/Adapter/DbTable/AbstractAdapter.php index 3e908a2..55212cf 100644 --- a/src/Adapter/DbTable/AbstractAdapter.php +++ b/src/Adapter/DbTable/AbstractAdapter.php @@ -348,7 +348,7 @@ protected function authenticateQuerySelect(Sql\Select $dbSelect) */ protected function authenticateValidateResultSet(array $resultIdentities) { - if (count($resultIdentities) < 1) { + if (! $resultIdentities) { $this->authenticateResultInfo['code'] = AuthenticationResult::FAILURE_IDENTITY_NOT_FOUND; $this->authenticateResultInfo['messages'][] = 'A record with the supplied identity could not be found.'; return $this->authenticateCreateAuthResult();