X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FLock.php;h=45d6c96c8e51ed89f67e1c78ecba7c4760d501a1;hb=8543b74722be005643a60f4fcd3cc5c9adde7038;hp=460475e4183fbc7202e7a576c28f191baf59f977;hpb=29fab6010f74d0237ef68828f95a253846a02f1e;p=civicrm-core.git diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php index 460475e418..45d6c96c8e 100644 --- a/CRM/Core/Lock.php +++ b/CRM/Core/Lock.php @@ -1,34 +1,18 @@ array($this->_id, 'String'), - 2 => array($timeout ? $timeout : $this->_timeout, 'Integer'), - ); + $params = [ + 1 => [$this->_id, 'String'], + 2 => [$timeout ? $timeout : $this->_timeout, 'Integer'], + ]; $res = CRM_Core_DAO::singleValueQuery($query, $params); if ($res) { if (defined('CIVICRM_LOCK_DEBUG')) { @@ -220,7 +209,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { } $query = "SELECT RELEASE_LOCK( %1 )"; - $params = array(1 => array($this->_id, 'String')); + $params = [1 => [$this->_id, 'String']]; return CRM_Core_DAO::singleValueQuery($query, $params); } } @@ -230,7 +219,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { */ public function isFree() { $query = "SELECT IS_FREE_LOCK( %1 )"; - $params = array(1 => array($this->_id, 'String')); + $params = [1 => [$this->_id, 'String']]; return CRM_Core_DAO::singleValueQuery($query, $params); }