X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCxn%2FCiviCxnStore.php;h=972fbfa1dbc039a7a75931c05bcc47e7cb57aa08;hb=6524d35ee8c0f501e3787d63da36d28805828f2f;hp=dc25dc8c51ba22b9f698308233e8c45e1d930b66;hpb=e68d4035151c218b5e504883725fecd62eaea4ac;p=civicrm-core.git diff --git a/CRM/Cxn/CiviCxnStore.php b/CRM/Cxn/CiviCxnStore.php index dc25dc8c51..972fbfa1db 100644 --- a/CRM/Cxn/CiviCxnStore.php +++ b/CRM/Cxn/CiviCxnStore.php @@ -5,14 +5,14 @@ */ class CRM_Cxn_CiviCxnStore implements Civi\Cxn\Rpc\CxnStore\CxnStoreInterface { - protected $cxns = array(); + protected $cxns = []; /** * @inheritDoc */ public function getAll() { if (!$this->cxns) { - $this->cxns = array(); + $this->cxns = []; $dao = new CRM_Cxn_DAO_Cxn(); $dao->find(); while ($dao->fetch()) { @@ -71,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; } @@ -82,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]); } @@ -95,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), - ); + ]; } /**