X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FTask%2FRemoveFromTag.php;h=3c18e5b3e2e36a731ebb270c5d2bb30c74d00c06;hb=69078420f066e5d038b91372e9a19eb77073121b;hp=3d5025ccdbb01d12f54971fda6fa08cb9a36e6a2;hpb=5c22567ff39bf585b2da7920620666f4aef2cc92;p=civicrm-core.git diff --git a/CRM/Contact/Form/Task/RemoveFromTag.php b/CRM/Contact/Form/Task/RemoveFromTag.php index 3d5025ccdb..3c18e5b3e2 100644 --- a/CRM/Contact/Form/Task/RemoveFromTag.php +++ b/CRM/Contact/Form/Task/RemoveFromTag.php @@ -67,7 +67,7 @@ class CRM_Contact_Form_Task_RemoveFromTag extends CRM_Contact_Form_Task { } public function addRules() { - $this->addFormRule(array('CRM_Contact_Form_Task_RemoveFromTag', 'formRule')); + $this->addFormRule(['CRM_Contact_Form_Task_RemoveFromTag', 'formRule']); } /** @@ -77,7 +77,7 @@ class CRM_Contact_Form_Task_RemoveFromTag extends CRM_Contact_Form_Task { * @return array */ public static function formRule($form, $rule) { - $errors = array(); + $errors = []; if (empty($form['tag']) && empty($form['contact_taglist'])) { $errors['_qf_default'] = "Please select atleast one tag."; } @@ -91,7 +91,7 @@ class CRM_Contact_Form_Task_RemoveFromTag extends CRM_Contact_Form_Task { //get the submitted values in an array $params = $this->controller->exportValues($this->_name); - $contactTags = $tagList = array(); + $contactTags = $tagList = []; // check if contact tags exists if (!empty($params['tag'])) { @@ -120,27 +120,27 @@ class CRM_Contact_Form_Task_RemoveFromTag extends CRM_Contact_Form_Task { // merge contact and taglist tags $allTags = CRM_Utils_Array::crmArrayMerge($contactTags, $tagList); - $this->_name = array(); + $this->_name = []; foreach ($allTags as $key => $dnc) { $this->_name[] = $this->_tags[$key]; list($total, $removed, $notRemoved) = CRM_Core_BAO_EntityTag::removeEntitiesFromTag($this->_contactIds, $key, 'civicrm_contact', FALSE); - $status = array( - ts('%count contact un-tagged', array( - 'count' => $removed, - 'plural' => '%count contacts un-tagged', - )), - ); + $status = [ + ts('%count contact un-tagged', [ + 'count' => $removed, + 'plural' => '%count contacts un-tagged', + ]), + ]; if ($notRemoved) { - $status[] = ts('1 contact already did not have this tag', array( - 'count' => $notRemoved, - 'plural' => '%count contacts already did not have this tag', - )); + $status[] = ts('1 contact already did not have this tag', [ + 'count' => $notRemoved, + 'plural' => '%count contacts already did not have this tag', + ]); } $status = ''; - CRM_Core_Session::setStatus($status, ts("Removed Tag %1", array(1 => $this->_tags[$key])), 'success', array('expires' => 0)); + CRM_Core_Session::setStatus($status, ts("Removed Tag %1", [1 => $this->_tags[$key]]), 'success', ['expires' => 0]); } }