X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCxn%2FCiviCxnStore.php;h=972fbfa1dbc039a7a75931c05bcc47e7cb57aa08;hb=2fabb51bd1669c94ca0c62f5b4ca23089f17e53f;hp=eb05f86119fe47499d67c03784d81950df82385b;hpb=d29ca3ca2a0f5c800fa7142dc638fc61cad88bce;p=civicrm-core.git diff --git a/CRM/Cxn/CiviCxnStore.php b/CRM/Cxn/CiviCxnStore.php index eb05f86119..972fbfa1db 100644 --- a/CRM/Cxn/CiviCxnStore.php +++ b/CRM/Cxn/CiviCxnStore.php @@ -1,15 +1,18 @@ cxns) { - $this->cxns = array(); + $this->cxns = []; $dao = new CRM_Cxn_DAO_Cxn(); $dao->find(); while ($dao->fetch()) { @@ -68,9 +71,9 @@ class CRM_Cxn_CiviCxnStore implements Civi\Cxn\Rpc\CxnStore\CxnStoreInterface { WHERE created_date IS NULL AND cxn_guid = %1 '; - CRM_Core_DAO::executeQuery($sql, array( - 1 => array($cxn['cxnId'], 'String'), - )); + CRM_Core_DAO::executeQuery($sql, [ + 1 => [$cxn['cxnId'], 'String'], + ]); $this->cxns[$cxn['cxnId']] = $cxn; } @@ -79,9 +82,9 @@ class CRM_Cxn_CiviCxnStore implements Civi\Cxn\Rpc\CxnStore\CxnStoreInterface { * @inheritDoc */ public function remove($cxnId) { - CRM_Core_DAO::executeQuery('DELETE FROM civicrm_cxn WHERE cxn_guid = %1', array( - 1 => array($cxnId, 'String'), - )); + CRM_Core_DAO::executeQuery('DELETE FROM civicrm_cxn WHERE cxn_guid = %1', [ + 1 => [$cxnId, 'String'], + ]); unset($this->cxns[$cxnId]); } @@ -92,14 +95,14 @@ class CRM_Cxn_CiviCxnStore implements Civi\Cxn\Rpc\CxnStore\CxnStoreInterface { */ protected function convertDaoToCxn($dao) { $appMeta = json_decode($dao->app_meta, TRUE); - return array( + return [ 'cxnId' => $dao->cxn_guid, 'secret' => $dao->secret, 'appId' => $dao->app_guid, 'appUrl' => $appMeta['appUrl'], 'siteUrl' => CRM_Cxn_BAO_Cxn::getSiteCallbackUrl(), 'perm' => json_decode($dao->perm, TRUE), - ); + ]; } /**