phpcs - Fix error, "Visibility must be declared on method"
[civicrm-core.git] / CRM / Campaign / Form / Task / Interview.php
index 61fbb2994abe31614e687aa2efb14bfb2327b53d..32a5167916213d246f8ea05ca1a17769711d29ab 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task {
 
   /**
-   * the title of the group
+   * The title of the group
    *
    * @var string
    */
   protected $_title;
 
   /**
-   * variable to store redirect path
+   * Variable to store redirect path
    *
    */
   private $_userContext;
@@ -70,12 +70,12 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task {
   private $_allowAjaxReleaseButton;
 
   /**
-   * build all the data structures needed to build the form
+   * Build all the data structures needed to build the form
    *
    * @return void
    * @access public
    */
-  function preProcess() {
+  public function preProcess() {
     $this->_votingTab = $this->get('votingTab');
     $this->_reserveToInterview = $this->get('reserveToInterview');
     if ($this->_reserveToInterview || $this->_votingTab) {
@@ -109,23 +109,19 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task {
     elseif ( CRM_Core_OptionGroup::getValue('activity_type','WalkList') == $this->_surveyDetails['activity_type_id'] ) {
       $orderByParams =
         array(
-          1 =>
-          array(
+          1 => array(
             'column' => 'civicrm_address.street_name',
             'order'  => 'ASC',
           ),
-          2 =>
-          array(
+          2 => array(
             'column' => 'civicrm_address.street_number%2',
             'order' => 'ASC',
           ),
-          3 =>
-          array(
+          3 => array(
             'column' => 'civicrm_address.street_number',
             'order' => 'ASC',
           ),
-          4 =>
-          array(
+          4 => array(
             'column' => 'contact_a.sort_name',
             'order' => 'ASC',
           ),
@@ -261,7 +257,7 @@ WHERE {$clause}
     CRM_Utils_System::setTitle(ts('Record %1 Responses', array(1 => $activityTypes[$this->_surveyTypeId])));
   }
 
-  function validateIds() {
+  public function validateIds() {
     $required = array('surveyId' => ts('Could not find Survey.'),
       'interviewerId' => ts('Could not find Interviewer.'),
       'contactIds' => ts('No respondents are currently reserved for you to interview.'),
@@ -283,13 +279,13 @@ WHERE {$clause}
   }
 
   /**
-   * Build the form
+   * Build the form object
    *
    * @access public
    *
    * @return void
    */
-  function buildQuickForm() {
+  public function buildQuickForm() {
     $this->assign('surveyTypeId', $this->_surveyTypeId);
 
     $options =
@@ -383,13 +379,13 @@ WHERE {$clause}
   }
 
   /**
-   * This function sets the default values for the form.
+   * Set default values for the form.
    *
    * @access public
    *
    * @return void
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     //load default data for only contact fields.
     $contactFields = $defaults = array();
     foreach ($this->_surveyFields as $name => $field) {
@@ -408,23 +404,19 @@ WHERE {$clause}
     if ( CRM_Core_OptionGroup::getValue('activity_type','WalkList') == $this->_surveyDetails['activity_type_id'] ) {
       $defaults['order_bys'] =
         array(
-          1 =>
-          array(
+          1 => array(
             'column' => 'civicrm_address.street_name',
             'order'  => 'ASC',
           ),
-          2 =>
-          array(
+          2 => array(
             'column' => 'civicrm_address.street_number%2',
             'order' => 'ASC',
           ),
-          3 =>
-          array(
+          3 => array(
             'column' => 'civicrm_address.street_number',
             'order' => 'ASC',
           ),
-          4 =>
-          array(
+          4 => array(
             'column' => 'contact_a.sort_name',
             'order' => 'ASC',
           ),
@@ -444,7 +436,7 @@ WHERE {$clause}
   }
 
   /**
-   * process the form after the input has been submitted and validated
+   * Process the form after the input has been submitted and validated
    *
    * @access public
    *
@@ -470,11 +462,11 @@ WHERE {$clause}
   }
 
   /**
-   * @param $params
+   * @param array $params
    *
    * @return mixed
    */
-  static function registerInterview($params) {
+  public static function registerInterview($params) {
     $activityId = CRM_Utils_Array::value('activity_id', $params);
     $surveyTypeId = CRM_Utils_Array::value('activity_type_id', $params);
     if (!is_array($params) || !$surveyTypeId || !$activityId) {
@@ -580,7 +572,7 @@ WHERE {$clause}
     return $activityId;
   }
 
-  function getVoterIds() {
+  public function getVoterIds() {
     if (!$this->_interviewerId) {
       $session = CRM_Core_Session::singleton();
       $this->_interviewerId = $session->get('userID');
@@ -612,7 +604,7 @@ WHERE {$clause}
     }
   }
 
-  function filterVoterIds() {
+  public function filterVoterIds() {
     //do the cleanup later on.
     if (!is_array($this->_contactIds)) {
       return;