INFRA-132 - Trailing commas for multiline arrays
[civicrm-core.git] / CRM / Core / Controller.php
index a384ff8bb203d5d98c8425ce1948a957ff77ccc6..0e4ff0261137d08bb402fc60c3bfa3ee5fa6cd75 100644 (file)
@@ -117,6 +117,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
 
   /**
    * QF response type
+   *
+   * @var string
    */
   public $_QFResponseType = 'html';
 
@@ -159,15 +161,19 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   /**
    * All CRM single or multi page pages should inherit from this class.
    *
-   * @param string $title descriptive title of the controller
-   * @param bool $modal whether controller is modal
-   * @param null $mode
-   * @param string $scope name of session if we want unique scope, used only by Controller_Simple
-   * @param bool $addSequence should we add a unique sequence number to the end of the key
-   * @param bool $ignoreKey should we not set a qfKey for this controller (for standalone forms)
-   *
+   * @param string $title
+   *   Descriptive title of the controller.
+   * @param bool $modal
+   *   Whether controller is modal.
+   * @param mixed $mode
+   * @param string $scope
+   *   Name of session if we want unique scope, used only by Controller_Simple.
+   * @param bool $addSequence
+   *   Should we add a unique sequence number to the end of the key.
+   * @param bool $ignoreKey
+   *   Should we not set a qfKey for this controller (for standalone forms).
    *
-   * @return CRM_Core_Controller
+   * @internal param bool $whether controller is modal
    */
   function __construct(
     $title = NULL,
@@ -246,7 +252,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
       }
     }
 
-   // if the request has a reset value, initialize the controller session
+    // if the request has a reset value, initialize the controller session
     if (!empty($_GET['reset'])) {
       $this->reset();
 
@@ -261,7 +267,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
     // and created the scope etc
     $this->set('qfKey', $this->_key);
 
-
     // also retrieve and store destination in session
     $this->_destination = CRM_Utils_Request::retrieve(
       'civicrmDestination',
@@ -327,6 +332,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * This run is basically a composition of the original run and the
    * jump action
    *
+   * @return mixed
    */
   public function run() {
     // the names of the action and page should be saved
@@ -375,8 +381,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 directory to store all the uploaded files
+   * @param array names for the various upload buttons (note u can have more than 1 upload)
    *
    *
    * @return void
@@ -450,10 +456,10 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
 
       $ext = CRM_Extension_System::singleton()->getMapper();
       if ($ext->isExtensionClass($className)) {
-        require_once ($ext->classToPath($className));
+        require_once $ext->classToPath($className);
       }
       else {
-        require_once (str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php');
+        require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
       }
       $$stateName = new $className($stateMachine->find($className), $action, 'post', $formName);
       if ($title) {
@@ -507,13 +513,15 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    *
    * @return void
    */
-  public function process() {}
+  public function process() {
+  }
 
   /**
    * 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 value of the variable if string
+   * @param string|array $name name of the variable or an assoc array of name/value pairs
+   * @param mixed $value
+   *   Value of the variable if string.
    *
    *
    * @return void
@@ -526,7 +534,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   /**
    * Get the variable from the form scope
    *
-   * @param  string $name  : name  of the variable
+   * @param string $name
+   *   : name of the variable.
    *
 
    *
@@ -541,7 +550,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * Create the header for the wizard from the list of pages
    * Store the created header in smarty
    *
-   * @param string $currentPageName name of the page being displayed
+   * @param string $currentPageName
+   *   Name of the page being displayed.
    *
    * @return array
    */
@@ -597,7 +607,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * Assign value to name in template
    *
    * @param string $var
-   * @param mixed $value value of varaible
+   * @param mixed $value
+   *   Value of varaible.
    *
    * @return void
    */
@@ -609,7 +620,8 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * Assign value to name in template by reference
    *
    * @param string $var
-   * @param mixed $value (reference) value of varaible
+   * @param mixed $value
+   *   (reference) value of varaible.
    *
    * @return void
    */
@@ -621,10 +633,11 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    * Appends values to template variables
    *
    * @param array|string $tpl_var the template variable name(s)
-   * @param mixed $value the value to append
+   * @param mixed $value
+   *   The value to append.
    * @param bool $merge
    */
-  public function append($tpl_var, $value=NULL, $merge=FALSE) {
+  public function append($tpl_var, $value = NULL, $merge = FALSE) {
     self::$_template->append($tpl_var, $value, $merge);
   }
 
@@ -635,14 +648,14 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
    *
    * @return array
    */
-  public function get_template_vars($name=null) {
+  public function get_template_vars($name = NULL) {
     return self::$_template->get_template_vars($name);
   }
 
   /**
    * Setter for embedded
    *
-   * @param boolean $embedded
+   * @param bool $embedded
    *
    * @return void
    */
@@ -662,7 +675,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   /**
    * Setter for skipRedirection
    *
-   * @param boolean $skipRedirection
+   * @param bool $skipRedirection
    *
    * @return void
    */
@@ -711,7 +724,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
   /**
    * Setter for print
    *
-   * @param boolean $print
+   * @param bool $print
    *
    * @return void
    */