/**
* @return string
*/
- public function getDefaultEntity() {
+ public function getDefaultEntity(): string {
return 'Activity';
}
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public function preProcess() {
+ public function preProcess(): void {
$this->set('searchFormName', 'Search');
// set the button names
parent::preProcess();
- if (empty($this->_formValues)) {
- if (isset($this->_ssID)) {
- $this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID);
- }
+ if (empty($this->_formValues) && isset($this->_ssID)) {
+ $this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID);
}
$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
$this->_context
);
$prefix = NULL;
- if ($this->_context == 'user') {
+ if ($this->_context === 'user') {
$prefix = $this->_prefix;
}
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public function buildQuickForm() {
+ public function buildQuickForm(): void {
parent::buildQuickForm();
$this->addSortNameField();
* The processing consists of using a Selector / Controller framework for getting the
* search results.
*
- * @throws \CRM_Core_Exception
+ * @throws \CRM_Core_Exception|\CiviCRM_API3_Exception
*/
- public function postProcess() {
+ public function postProcess(): void {
if ($this->_done) {
return;
}
// We don't show test records in summaries or dashboards
if (empty($this->_formValues['activity_test']) && $this->_force) {
- $this->_formValues["activity_test"] = 0;
+ $this->_formValues['activity_test'] = 0;
}
$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
// use getEntity Defaults
$requestParams = CRM_Utils_Request::exportValues();
foreach (array_keys($requestParams) as $key) {
- if (substr($key, 0, 7) != 'custom_') {
+ if (substr($key, 0, 7) !== 'custom_') {
continue;
}
elseif (empty($requestParams[$key])) {