Merge pull request #5078 from eileenmcnaughton/comment-full-stops
[civicrm-core.git] / CRM / Core / Controller.php
index cd62a31fe7f1f1ff3e3aba2a5063db8555605c57..34ca7eca91844af2790dc0bb24f45c75e1fe4408 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * This class acts as our base controller class and adds additional
@@ -52,28 +52,28 @@ require_once 'HTML/QuickForm/Action/Direct.php';
 class CRM_Core_Controller extends HTML_QuickForm_Controller {
 
   /**
-   * The title associated with this controller
+   * The title associated with this controller.
    *
    * @var string
    */
   protected $_title;
 
   /**
-   * The key associated with this controller
+   * The key associated with this controller.
    *
    * @var string
    */
   public $_key;
 
   /**
-   * The name of the session scope where values are stored
+   * The name of the session scope where values are stored.
    *
    * @var object
    */
   protected $_scope;
 
   /**
-   * The state machine associated with this controller
+   * The state machine associated with this controller.
    *
    * @var object
    */
@@ -116,35 +116,35 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   public $_generateQFKey = TRUE;
 
   /**
-   * QF response type
+   * QF response type.
    *
    * @var string
    */
   public $_QFResponseType = 'html';
 
   /**
-   * Cache the smarty template for efficiency reasons
+   * Cache the smarty template for efficiency reasons.
    *
    * @var CRM_Core_Smarty
    */
   static protected $_template;
 
   /**
-   * Cache the session for efficiency reasons
+   * Cache the session for efficiency reasons.
    *
    * @var CRM_Core_Session
    */
   static protected $_session;
 
   /**
-   * The parent of this form if embedded
+   * The parent of this form if embedded.
    *
    * @var object
    */
   protected $_parent = NULL;
 
   /**
-   * The destination if set will override the destination the code wants to send it to
+   * The destination if set will override the destination the code wants to send it to.
    *
    * @var string;
    */
@@ -173,7 +173,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * @param bool $ignoreKey
    *   Should we not set a qfKey for this controller (for standalone forms).
    */
-  function __construct(
+  public function __construct(
     $title = NULL,
     $modal = TRUE,
     $mode = NULL,
@@ -193,8 +193,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
     // lets try to get it from the session and/or the request vars
     // we do this early on in case there is a fatal error in retrieving the
     // key and/or session
-    $this->_entryURL =
-      CRM_Utils_Request::retrieve('entryURL', 'String', $this);
+    $this->_entryURL
+      CRM_Utils_Request::retrieve('entryURL', 'String', $this);
 
     // add a unique validable key to the name
     $name = CRM_Utils_System::getClassName($this);
@@ -379,8 +379,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * Helper function to add all the needed default actions. Note that the framework
    * redefines all of the default QFC actions
    *
-   * @param string directory to store all the uploaded files
-   * @param array names for the various upload buttons (note u can have more than 1 upload)
+   * @param string $uploadDirectory to store all the uploaded files
+   * @param array $uploadNames for the various upload buttons (note u can have more than 1 upload)
    *
    *
    * @return void
@@ -408,7 +408,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Getter method for stateMachine
+   * Getter method for stateMachine.
    *
    * @return CRM_Core_StateMachine
    */
@@ -417,7 +417,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Setter method for stateMachine
+   * Setter method for stateMachine.
    *
    * @param CRM_Core_StateMachine $stateMachine
    *
@@ -515,7 +515,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Store the variable with the value in the form scope
+   * Store the variable with the value in the form scope.
    *
    * @param string|array $name name of the variable or an assoc array of name/value pairs
    * @param mixed $value
@@ -529,7 +529,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Get the variable from the form scope
+   * Get the variable from the form scope.
    *
    * @param string $name
    *   name of the variable.
@@ -542,7 +542,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Create the header for the wizard from the list of pages
+   * Create the header for the wizard from the list of pages.
    * Store the created header in smarty
    *
    * @param string $currentPageName
@@ -599,7 +599,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Assign value to name in template
+   * Assign value to name in template.
    *
    * @param string $var
    * @param mixed $value
@@ -612,7 +612,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Assign value to name in template by reference
+   * Assign value to name in template by reference.
    *
    * @param string $var
    * @param mixed $value
@@ -625,7 +625,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Appends values to template variables
+   * Appends values to template variables.
    *
    * @param array|string $tpl_var the template variable name(s)
    * @param mixed $value
@@ -637,7 +637,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Returns an array containing template variables
+   * Returns an array containing template variables.
    *
    * @param string $name
    *
@@ -648,7 +648,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Setter for embedded
+   * Setter for embedded.
    *
    * @param bool $embedded
    *
@@ -659,9 +659,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Getter for embedded
+   * Getter for embedded.
    *
-   * @return boolean
+   * @return bool
    *   return the embedded value
    */
   public function getEmbedded() {
@@ -669,7 +669,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Setter for skipRedirection
+   * Setter for skipRedirection.
    *
    * @param bool $skipRedirection
    *
@@ -680,9 +680,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Getter for skipRedirection
+   * Getter for skipRedirection.
    *
-   * @return boolean
+   * @return bool
    *   return the skipRedirection value
    */
   public function getSkipRedirection() {
@@ -719,7 +719,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Setter for print
+   * Setter for print.
    *
    * @param bool $print
    *
@@ -736,9 +736,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   }
 
   /**
-   * Getter for print
+   * Getter for print.
    *
-   * @return boolean
+   * @return bool
    *   return the print value
    */
   public function getPrint() {