From 51299070ff4c25eb43a8c5c33af73d2a80e4d299 Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 9 Nov 2019 09:50:01 +1300 Subject: [PATCH] [NFC] comment fixes - exceptions & don't declare NULL --- CRM/Core/Form/Search.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Form/Search.php b/CRM/Core/Form/Search.php index dc9b7a100c..1a46af8da2 100644 --- a/CRM/Core/Form/Search.php +++ b/CRM/Core/Form/Search.php @@ -70,7 +70,7 @@ class CRM_Core_Form_Search extends CRM_Core_Form { * * @var string */ - protected $_context = NULL; + protected $_context; /** * The list of tasks or actions that a searcher can perform on a result set. @@ -151,6 +151,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form { /** * Common buildForm tasks required by all searches. + * + * @throws \CRM_Core_Exception */ public function buildQuickForm() { CRM_Core_Resources::singleton() @@ -176,6 +178,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form { * * The goal is to describe all fields in metadata and handle from metadata rather * than existing ad hoc handling. + * + * @throws \CiviCRM_API3_Exception */ public function addFormFieldsFromMetadata() { $this->addFormRule(['CRM_Core_Form_Search', 'formRule'], $this); @@ -360,6 +364,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form { * * Note that for translation purposes the full string works better than using 'prefix' hence we use override-able functions * to define the string. + * + * @throws \CiviCRM_API3_Exception */ protected function addSortNameField() { $title = civicrm_api3('setting', 'getvalue', ['name' => 'includeEmailInName', 'group' => 'Search Preferences']) ? $this->getSortNameLabelWithEmail() : $this->getSortNameLabelWithOutEmail(); @@ -403,6 +409,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form { /** * Add generic fields that specify the contact. + * + * @throws \CiviCRM_API3_Exception */ protected function addContactSearchFields() { if (!$this->isFormInViewOrEditMode()) { @@ -442,6 +450,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form { /** * we allow the controller to set force/reset externally, useful when we are being * driven by the wizard framework + * + * @throws \CRM_Core_Exception */ protected function loadStandardSearchOptionsFromUrl() { $this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean'); -- 2.25.1