Merge pull request #5967 from colemanw/CRM-16632
[civicrm-core.git] / CRM / Core / State.php
index a926d48e2181af81d97da84f501914d7c89772c7..afedce9c7be7c6e9c8525afa1a3a9fa34e04604e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * The basic state element. Each state element is linked to a form and
  * things like going back / stepping forward / process etc
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Core_State {
 
   /**
-   * State name
+   * State name.
    * @var string
    */
   protected $_name;
@@ -51,19 +51,19 @@ class CRM_Core_State {
   protected $_type;
 
   /**
-   * The state that precedes this state
+   * The state that precedes this state.
    * @var CRM_Core_State
    */
   protected $_back;
 
   /**
-   * The state that succeeds this state
+   * The state that succeeds this state.
    * @var CRM_Core_State
    */
   protected $_next;
 
   /**
-   * The state machine that this state is part of
+   * The state machine that this state is part of.
    * @var CRM_Core_StateMachine
    */
   protected $_stateMachine;
@@ -77,13 +77,18 @@ class CRM_Core_State {
   const START = 1, FINISH = 2, SIMPLE = 4;
 
   /**
-   * Constructor
+   * Constructor.
    *
-   * @param string $name internal name of the state
-   * @param int $type state type
-   * @param CRM_Core_State $back state that precedes this state
-   * @param CRM_Core_State $next state that follows  this state
-   * @param CRM_Core_StateMachine $stateMachine statemachine that this states belongs to
+   * @param string $name
+   *   Internal name of the state.
+   * @param int $type
+   *   State type.
+   * @param CRM_Core_State $back
+   *   State that precedes this state.
+   * @param CRM_Core_State $next
+   *   State that follows this state.
+   * @param CRM_Core_StateMachine $stateMachine
+   *   Statemachine that this states belongs to.
    *
    * @return CRM_Core_State
    */
@@ -103,9 +108,8 @@ class CRM_Core_State {
   /**
    * Given an CRM Form, jump to the previous page
    *
-   * @param object the CRM_Core_Form element under consideration
-   *
-   * @return mixed does a jump to the back state
+   * @return mixed
+   *   does a jump to the back state
    */
   public function handleBackState(&$page) {
     if ($this->_type & self::START) {
@@ -120,9 +124,8 @@ class CRM_Core_State {
   /**
    * Given an CRM Form, jump to the next page
    *
-   * @param object the CRM_Core_Form element under consideration
-   *
-   * @return mixed does a jump to the nextstate
+   * @return mixed
+   *   does a jump to the nextstate
    */
   public function handleNextState(&$page) {
     if ($this->_type & self::FINISH) {
@@ -154,8 +157,6 @@ class CRM_Core_State {
    * Mark this page as valid for the QFC framework. This is needed as
    * we build more advanced functionality into the StateMachine
    *
-   * @param object the QFC data container
-   *
    * @return void
    */
   public function validate(&$data) {
@@ -166,8 +167,6 @@ class CRM_Core_State {
    * Mark this page as invalid for the QFC framework. This is needed as
    * we build more advanced functionality into the StateMachine
    *
-   * @param object the QFC data container
-   *
    * @return void
    */
   public function invalidate(&$data) {
@@ -175,7 +174,7 @@ class CRM_Core_State {
   }
 
   /**
-   * Getter for name
+   * Getter for name.
    *
    * @return string
    */
@@ -184,9 +183,7 @@ class CRM_Core_State {
   }
 
   /**
-   * Setter for name
-   *
-   * @param string
+   * Setter for name.
    *
    * @return void
    */
@@ -195,11 +192,12 @@ class CRM_Core_State {
   }
 
   /**
-   * Getter for type
+   * Getter for type.
    *
    * @return int
    */
   public function getType() {
     return $this->_type;
   }
+
 }