INFRA-132 - CRM/ - PHPStorm cleanup
[civicrm-core.git] / CRM / PCP / Form / Event.php
index 681fd2ec21d6b7a24b74891b68c43f2c04d5bf10..2b02239dee8e54b4531166f64874df7b1dbcb8a8 100644 (file)
@@ -43,7 +43,6 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
    * The type of pcp component.
    *
    * @var int
-   * @protected
    */
   public $_component = 'event';
 
@@ -55,7 +54,6 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
   /**
    * Set default values for the form.
    *
-   * @access public
    *
    * @return void
    */
@@ -64,8 +62,8 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
 
     $defaults = array();
     if (isset($this->_id)) {
-    $title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title');
-    CRM_Utils_System::setTitle(ts('Personal Campaign Page Settings (%1)', array(1 => $title)));
+      $title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title');
+      CRM_Utils_System::setTitle(ts('Personal Campaign Page Settings (%1)', array(1 => $title)));
 
       $params = array('entity_id' => $this->_id, 'entity_table' => 'civicrm_event');
       CRM_Core_DAO::commonRetrieve('CRM_PCP_DAO_PCPBlock', $params, $defaults);
@@ -82,7 +80,8 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
       $defaults['link_text'] = ts('Promote this event with a personal campaign page');
 
       if ($this->_id &&
-          $ccReceipt = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'cc_receipt')) {
+        $ccReceipt = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'cc_receipt')
+      ) {
         $defaults['notify_email'] = $ccReceipt;
       }
     }
@@ -93,7 +92,6 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
    * Build the form object
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
     CRM_PCP_BAO_PCP::buildPCPForm($this);
@@ -108,7 +106,8 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
     $this->add('select', 'target_entity_id',
       ts('Online Contribution Page'),
       array(
-        '' => ts('- select -')) +
+        '' => ts('- select -')
+      ) +
       CRM_Contribute_PseudoConstant::contributionPage()
     );
 
@@ -122,7 +121,9 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
 
     if (!empty($pcpBlock->id) && CRM_PCP_BAO_PCP::getPcpBlockInUse($pcpBlock->id)) {
       foreach (array(
-        'target_entity_type', 'target_entity_id') as $element_name) {
+                 'target_entity_type',
+                 'target_entity_id'
+               ) as $element_name) {
         $element = $this->getElement($element_name);
         $element->freeze();
       }
@@ -133,13 +134,13 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
   /**
    * Validation
    *
-   * @param array $params (ref.) an assoc array of name/value pairs
+   * @param array $params
+   *   (ref.) an assoc array of name/value pairs.
    *
    * @param $files
    * @param $self
    *
    * @return mixed true or array of errors
-   * @access public
    * @static
    */
   public static function formRule($params, $files, $self) {
@@ -175,7 +176,6 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
   /**
    * Process the form submission
    *
-   * @access public
    *
    * @return void
    */
@@ -196,9 +196,9 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
       $params['target_entity_id'] = CRM_Utils_Array::value('target_entity_id', $params, $this->_id);
     }
 
-    $dao               = new CRM_PCP_DAO_PCPBlock();
+    $dao = new CRM_PCP_DAO_PCPBlock();
     $dao->entity_table = $params['entity_table'];
-    $dao->entity_id    = $this->_id;
+    $dao->entity_id = $this->_id;
     $dao->find(TRUE);
     $params['id'] = $dao->id;
     $params['is_active'] = CRM_Utils_Array::value('pcp_active', $params, FALSE);
@@ -217,10 +217,8 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent {
    * Return a descriptive name for the page, used in wizard header
    *
    * @return string
-   * @access public
    */
   public function getTitle() {
     return ts('Enable Personal Campaign Pages');
   }
 }
-