Further comment fixes
authoreileen <emcnaughton@wikimedia.org>
Tue, 10 Jan 2017 01:20:56 +0000 (14:20 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 10 Jan 2017 01:21:14 +0000 (14:21 +1300)
21 files changed:
CRM/Activity/Page/AJAX.php
CRM/Admin/Form/Setting/Localization.php
CRM/Contact/Form/DedupeFind.php
CRM/Core/BAO/Country.php
CRM/Core/BAO/PrevNextCache.php
CRM/Core/CodeGen/DAO.php
CRM/Core/Config/Runtime.php
CRM/Core/I18n.php
CRM/Core/Page/AJAX.php
CRM/Core/Smarty.php
CRM/Cxn/CiviCxnHttp.php
CRM/Event/Form/ParticipantFeeSelection.php
CRM/Event/Page/ParticipantListing.php
CRM/Financial/Form/BatchTransaction.php
CRM/Member/Tokens.php
CRM/PCP/Form/Campaign.php
CRM/Tag/Form/Edit.php
CRM/Utils/Hook.php
CRM/Utils/PDF/Label.php
CRM/Utils/System/Drupal.php
xml/templates/schema_structure.tpl

index 21388f998ed02721252d1add8d616434793e1270..b7f4e14624ee420500eae3dcc5d0174be97641ba 100644 (file)
@@ -389,6 +389,11 @@ class CRM_Activity_Page_AJAX {
     return (array('error_msg' => $error_msg, 'newId' => $mainActivity->id));
   }
 
+  /**
+   * Get activities for the contact.
+   *
+   * @return array
+   */
   public static function getContactActivity() {
     $requiredParameters = array(
       'cid' => 'Integer',
index bb7b40d87eab587e86335ccc960fce05ec3766aa..bae910d9ffcdebe78bfcbd9b801a4256cd11f0c7 100644 (file)
@@ -158,6 +158,11 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting {
     return empty($errors) ? TRUE : $errors;
   }
 
+  /**
+   * Set the default values for the form.
+   *
+   * @return array
+   */
   public function setDefaultValues() {
     parent::setDefaultValues();
 
@@ -321,6 +326,14 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting {
     return $_currencySymbols;
   }
 
+  /**
+   * Update session and uf_match table when the locale is updated.
+   *
+   * @param string $oldLocale
+   * @param string $newLocale
+   * @param array $metadata
+   * @param int $domainID
+   */
   public static function onChangeLcMessages($oldLocale, $newLocale, $metadata, $domainID) {
     if ($oldLocale == $newLocale) {
       return;
index efed4257c908a9774918524f8439170a8d6a4576..155862b7a79438dfb45fa7a579859907fd477ad3 100644 (file)
@@ -71,6 +71,11 @@ class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form {
     );
   }
 
+  /**
+   * Set the default values for the form.
+   *
+   * @return array
+   */
   public function setDefaultValues() {
     $this->_defaults['limit'] = Civi::settings()->get('dedupe_default_limit');
     return $this->_defaults;
index dd0af4daf8265d7f651561d7916207d1a4b5fb86..23b3d64eae463d725f99b1d9f5d9146a2e030755 100644 (file)
@@ -152,6 +152,13 @@ class CRM_Core_BAO_Country extends CRM_Core_DAO_Country {
     return $cachedSymbol;
   }
 
+  /**
+   * Get the default currency symbol.
+   *
+   * @param string $k Unused variable
+   *
+   * @return string
+   */
   public static function getDefaultCurrencySymbol($k = NULL) {
     $config = CRM_Core_Config::singleton();
     return $config->defaultCurrencySymbol(Civi::settings()->get('defaultCurrency'));
index 27bc212eeddef121676f10a65d8e68d51a5a1463..ed1e367bd41d28c9e36183937e45361abc1fdd99 100644 (file)
@@ -159,6 +159,16 @@ WHERE  cacheKey     = %3 AND
     CRM_Core_DAO::executeQuery($sql, $params);
   }
 
+  /**
+   * Mark contacts as being in conflict.
+   *
+   * @param int $id1
+   * @param int $id2
+   * @param string $cacheKey
+   * @param array $conflicts
+   *
+   * @return bool
+   */
   public static function markConflict($id1, $id2, $cacheKey, $conflicts) {
     if (empty($cacheKey) || empty($conflicts)) {
       return FALSE;
index 65dd5b82e46d549e9cb89f5a93d367d195c162e6..8db0b9d36b6871aa89ce1cd23d869ea6d58feb0a 100644 (file)
@@ -49,6 +49,9 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
       $this->getRaw());
   }
 
+  /**
+   * Run generator.
+   */
   public function run() {
     echo "Generating {$this->name} as " . $this->getRelFileName() . "\n";
 
@@ -78,11 +81,18 @@ class CRM_Core_CodeGen_DAO extends CRM_Core_CodeGen_BaseTask {
     return $this->raw;
   }
 
+  /**
+   * Get relative file name.
+   *
+   * @return string
+   */
   public function getRelFileName() {
     return $this->tables[$this->name]['fileName'];
   }
 
   /**
+   * Get the absolute file name.
+   *
    * @return string
    */
   public function getAbsFileName() {
index 6c9afc8e5b35a44f5ac697edad17919647f6e1ac..3282de2d81bdc794dd590fbd62c91f4f8135becf 100644 (file)
@@ -138,6 +138,11 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
     $this->initialized = 1;
   }
 
+  /**
+   * Exit processing after a fatal event, outputting the message.
+   *
+   * @param string $message
+   */
   private function fatal($message) {
     echo $message;
     exit();
index de62c3e5cbe874f6a156122ab9249bc309c0d490..ca7706cd9d5caf7f5c428b7b35fc1df71ebef29f 100644 (file)
@@ -97,7 +97,11 @@ class CRM_Core_I18n {
     return $this->_nativegettext;
   }
 
-
+  /**
+   * Set native locale for getText.
+   *
+   * @param string $locale
+   */
   protected function setNativeGettextLocale($locale) {
 
     $locale .= '.utf8';
@@ -117,6 +121,11 @@ class CRM_Core_I18n {
 
   }
 
+  /**
+   * Set getText locale.
+   *
+   * @param string $locale
+   */
   protected function setPhpGettextLocale($locale) {
 
     // we support both the old file hierarchy format and the new:
@@ -138,7 +147,6 @@ class CRM_Core_I18n {
 
   }
 
-
   /**
    * Return languages available in this instance of CiviCRM.
    *
@@ -221,6 +229,11 @@ class CRM_Core_I18n {
     return strtr($str, $tr);
   }
 
+  /**
+   * Get the directory for l10n resources.
+   *
+   * @return string
+   */
   public static function getResourceDir() {
     static $dir = NULL;
     if ($dir === NULL) {
index f52b7a0f318b4bf419c5e8e7a16f75442303ad0d..357b54466e7abce077add00cc6c29fc5cf4f656d 100644 (file)
@@ -256,6 +256,14 @@ class CRM_Core_Page_AJAX {
     return $params;
   }
 
+  /**
+   * Validate ajax input parameters.
+   *
+   * @param array $requiredParams
+   * @param array $optionalParams
+   *
+   * @return array
+   */
   public static function validateParams($requiredParams = array(), $optionalParams = array()) {
     $params = array();
 
index f3d34eff1041700f43e0988d007554c52dbcaaaa..258f1abb472d44c02766a4a97b6ce7cfe2f652f1 100644 (file)
@@ -317,6 +317,11 @@ class CRM_Core_Smarty extends Smarty {
     return $this;
   }
 
+  /**
+   * Get the locale for translation.
+   *
+   * @return string
+   */
   private function getLocale() {
     $tsLocale = CRM_Core_I18n::getLocale();
     if (!empty($tsLocale)) {
index da03e65167f34aaa35137277bd781344e8525ab6..f2b2c6357c8c1038b844817d7585473d2d756809 100644 (file)
@@ -79,6 +79,17 @@ class CRM_Cxn_CiviCxnHttp extends \Civi\Cxn\Rpc\Http\PhpHttp {
     return $result;
   }
 
+  /**
+   * Create stream options.
+   *
+   * @param string $verb
+   * @param string $url
+   * @param string $blob
+   * @param array $headers
+   *
+   * @return array
+   * @throws \Exception
+   */
   protected function createStreamOpts($verb, $url, $blob, $headers) {
     $result = parent::createStreamOpts($verb, $url, $blob, $headers);
 
index 92658df305a7c284674d5d1b6404c4a25d18faaf..3687471942850205863e6504ebf8414a1e178fe0 100644 (file)
@@ -117,6 +117,11 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     }
   }
 
+  /**
+   * Set default values for the form.
+   *
+   * @return array
+   */
   public function setDefaultValues() {
     $params = array('id' => $this->_participantId);
 
index 30a61114df7d53b9dda3f29ff29193c1a1df3af0..abaf12c7c625345405e7dfee8a44cdf5cee463fd 100644 (file)
@@ -65,6 +65,11 @@ class CRM_Event_Page_ParticipantListing extends CRM_Core_Page {
     $this->assign('displayRecent', FALSE);
   }
 
+  /**
+   * Run listing page.
+   *
+   * @throws \Exception
+   */
   public function run() {
     $this->preProcess();
 
index f42302243b27492fac20a8f256664454b7f36829..457a739b527ba0d192b8438da541fc089ade7084 100644 (file)
@@ -171,6 +171,9 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
     $this->add('text', 'name', ts('Batch Name'));
   }
 
+  /**
+   * Set the default values for the form.
+   */
   public function setDefaultValues() {
     // do not setdefault unless it is open/reopened batch
     if (!in_array($this->_batchStatus, array('Open', 'Reopened'))) {
index c4e8723db4e5ab6437bf8b43a951508926d7112b..983ae100357f12f328247c37a8bf0a903cb6c17d 100644 (file)
@@ -65,6 +65,11 @@ class CRM_Member_Tokens extends \Civi\Token\AbstractTokenSubscriber {
       && $processor->context['actionMapping']->getEntity() === 'civicrm_membership';
   }
 
+  /**
+   * Alter action schedule query.
+   *
+   * @param \Civi\ActionSchedule\Event\MailingQueryEvent $e
+   */
   public function alterActionScheduleQuery(\Civi\ActionSchedule\Event\MailingQueryEvent $e) {
     if ($e->mapping->getEntity() !== 'civicrm_membership') {
       return;
index f14e59ecb8a8aeddb8231fec5185e379bee24e81..8e5ea5fd9329b66e816c9210b12036b9652504cd 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2017
- * $Id$
- *
  */
 
 /**
- * This class generates form components for processing a pcp page creati
- *
+ * This class generates form components for processing a pcp page.
  */
 class CRM_PCP_Form_Campaign extends CRM_Core_Form {
   public $_context;
   public $_component;
 
+  /**
+   * Pre-process form.
+   */
   public function preProcess() {
     // we do not want to display recently viewed items, so turn off
     $this->assign('displayRecent', FALSE);
@@ -64,8 +64,14 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
     parent::preProcess();
   }
 
+  /**
+   * Set default form values.
+   *
+   * @return array
+   *   Default values for the form.
+   */
   public function setDefaultValues() {
-    $dafaults = array();
+    $defaults = array();
     $dao = new CRM_PCP_DAO_PCP();
 
     if ($this->_pageId) {
@@ -97,8 +103,6 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     $this->add('text', 'pcp_title', ts('Title'), NULL, TRUE);
@@ -188,9 +192,6 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
 
   /**
    * Process the form submission.
-   *
-   *
-   * @return void
    */
   public function postProcess() {
     $params = $this->controller->exportValues($this->_name);
index 5c6d7a7cee5edfbdc80be87626f1a67a10e39ac7..2bfa777b869d6a80932c11f5463d4f2d4b96ea48 100644 (file)
@@ -128,6 +128,11 @@ class CRM_Tag_Form_Edit extends CRM_Admin_Form {
     parent::buildQuickForm();
   }
 
+  /**
+   * Set default values for the form.
+   *
+   * @return array
+   */
   public function setDefaultValues() {
     $defaults = parent::setDefaultValues();
     if (empty($this->_id) || !CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $this->_id, 'color')) {
index 889302950eb9fa502df1f337cecc79e77dbf8ced..3f45a8fb71bf834be9e5e3e742d8d7ac4d79d55f 100644 (file)
@@ -89,6 +89,9 @@ abstract class CRM_Utils_Hook {
     return self::$_singleton;
   }
 
+  /**
+   * CRM_Utils_Hook constructor.
+   */
   public function __construct() {
     $this->cache = CRM_Utils_Cache::create(array(
       'name' => 'hooks',
index 68f7925c4b06b2461e6bc1d8fe4ec8b33cab7c59..e9a504004fa54dd6710cde6427e7f618e1ef0f82 100644 (file)
@@ -255,6 +255,11 @@ class CRM_Utils_PDF_Label extends TCPDF {
     }
   }
 
+  /**
+   * Get the available font names.
+   *
+   * @return array
+   */
   public function getFontNames() {
     // Define labels for TCPDF core fonts
     $fontLabel = array(
index 2ce3eeeb4cf7d7fdffa44d9c0f0defc7769ea956..963e7f2d9c9b0608b2d7a98c6c0d08d623200329 100644 (file)
@@ -299,6 +299,11 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase {
     $base_url = str_replace('http://', 'https://', $base_url);
   }
 
+  /**
+   * Get the name of the users table.
+   *
+   * @return string
+   */
   protected function getUsersTableName() {
     $userFrameworkUsersTableName = Civi::settings()->get('userFrameworkUsersTableName');
     if (empty($userFrameworkUsersTableName)) {
index 353b004ecf276b121200e76c768ccd161b3c519c..b52bb6bef2fc6eace15210242ac7f9abbe24c3d6 100644 (file)
  */
 class CRM_Core_I18n_SchemaStructure
 {ldelim}
-    static function &columns()
+
+    /**
+     * Get translatable columns.
+     *
+     * @return array
+     *   A table-indexed array of translatable columns.
+     */
+    public static function &columns()
     {ldelim}
         static $result = null;
         if (!$result) {ldelim}
@@ -52,7 +59,14 @@ class CRM_Core_I18n_SchemaStructure
         {rdelim}
         return $result;
     {rdelim}
-    static function &indices()
+
+    /**
+     * Get a table indexed array of the indices for translatable fields.
+     *
+     * @return array
+     *   Indices for translatable fields.
+     */
+    public static function &indices()
     {ldelim}
         static $result = null;
         if (!$result) {ldelim}
@@ -76,6 +90,13 @@ class CRM_Core_I18n_SchemaStructure
         {rdelim}
         return $result;
     {rdelim}
+
+    /**
+     * Get tables with translatable fields.
+     *
+     * @return array
+     *   Array of names of tables with fields that can be translated.
+     */
     static function &tables()
     {ldelim}
         static $result = null;
@@ -84,6 +105,13 @@ class CRM_Core_I18n_SchemaStructure
         {rdelim}
         return $result;
     {rdelim}
+
+    /**
+     * Get a list of widgets for editing translatable fields.
+     *
+     * @return array
+     *   Array of the widgets for editing translatable fields.
+     */
     static function &widgets()
     {ldelim}
         static $result = null;