From 86f20cc17dde028977130f84feaf3b1d760ca57d Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 17 Jan 2020 16:47:34 +1300 Subject: [PATCH] [NFC] Fix some missing exceptions etc --- CRM/Contact/Form/Search.php | 4 +++- CRM/Event/Form/Search.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 8277133483..1e64b00371 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -502,6 +502,8 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { /** * Processing needed for buildForm and later. + * + * @throws \CRM_Core_Exception */ public function preProcess() { // set the various class variables @@ -598,7 +600,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { } // fix for CRM-1907 - if (isset($this->_ssID) && $this->_context != 'smog') { + if (isset($this->_ssID) && $this->_context !== 'smog') { // we only retrieve the saved search values if out current values are null $this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID); diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index fb46fdb864..d1d0c9cdf8 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -99,7 +99,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { $this->_context ); $prefix = NULL; - if ($this->_context == 'user') { + if ($this->_context === 'user') { $prefix = $this->_prefix; } @@ -126,6 +126,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { * @return void * * @throws \CRM_Core_Exception + * @throws \CiviCRM_API3_Exception */ public function buildQuickForm() { parent::buildQuickForm(); @@ -436,6 +437,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { * * @return array * the default array reference + * @throws \CRM_Core_Exception */ public function setDefaultValues() { $this->_defaults = array_merge(parent::setDefaultValues(), (array) $this->_formValues); -- 2.25.1