From 46680d38544604c589da7bc447ee2dfc1397e9ef Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 18 Mar 2021 17:50:39 +0100 Subject: [PATCH] :art: ITopCounter : use KeyValueStore::class where possible instead of class name hardcoded in a string --- core/counter.class.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/counter.class.inc.php b/core/counter.class.inc.php index 0f75c3e97..86ecc8d80 100644 --- a/core/counter.class.inc.php +++ b/core/counter.class.inc.php @@ -71,8 +71,8 @@ final class ItopCounter 'key_name' => $sCounterName, 'namespace' => $sSelfClassName, )); - $oAttDef = MetaModel::GetAttributeDef('KeyValueStore', 'value'); - $aAttToLoad = array('KeyValueStore' => array('value' => $oAttDef)); + $oAttDef = MetaModel::GetAttributeDef(KeyValueStore::class, 'value'); + $aAttToLoad = array(KeyValueStore::class => array('value' => $oAttDef)); $sSql = $oFilter->MakeSelectQuery(array(), array(), $aAttToLoad); $hResult = mysqli_query($hDBLink, $sSql); $aCounter = mysqli_fetch_array($hResult, MYSQLI_NUM);