Add consistency between checkTemplateFileExists functions,
authorBradley Taylor <hello@brad-taylor.co.uk>
Thu, 20 Jan 2022 19:45:59 +0000 (19:45 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Thu, 20 Jan 2022 19:45:59 +0000 (19:45 +0000)
resolving phpdoc issues in the process.

CRM/Contribute/Form/ContributionBase.php
CRM/Event/Form/Registration.php
CRM/Profile/Form.php
CRM/Profile/Page/Dynamic.php
CRM/Profile/Page/Listings.php
CRM/Profile/Page/View.php

index 22eb615be8985eaa89d7ae5dc85e08666ec0513d..87c71b7914aa724fb45737966a01871c7720add7 100644 (file)
@@ -1011,9 +1011,10 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
   /**
    * Check template file exists.
    *
-   * @param string $suffix
+   * @param string|null $suffix
    *
-   * @return null|string
+   * @return string|null
+   *   Template file path, else null
    */
   public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_id) {
index 74526af6a41581e3ecbeeb7419864f418e998800..5ffb6d89022ff78d018b3b83f49e1ef25a1c72ca 100644 (file)
@@ -1056,13 +1056,14 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
   }
 
   /**
-   * Check if template file exists.
+   * Check template file exists.
    *
-   * @param string $suffix
+   * @param string|null $suffix
    *
-   * @return null|string
+   * @return string|null
+   *   Template file path, else null
    */
-  public function checkTemplateFileExists($suffix = '') {
+  public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_eventId) {
       $templateName = $this->_name;
       if (substr($templateName, 0, 12) == 'Participant_') {
index e8e58cb7f74fb7c99ee754af2a6189a84a7aa316..e503e728860dc11c8b9c42931ab16a8ee511b3a0 100644 (file)
@@ -1353,9 +1353,12 @@ class CRM_Profile_Form extends CRM_Core_Form {
   }
 
   /**
-   * @param null $suffix
+   * Check template file exists.
    *
-   * @return null|string
+   * @param string|null $suffix
+   *
+   * @return string|null
+   *   Template file path, else null
    */
   public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_gid) {
index 2e05630f61b5ddaee03f2459146d37e04b54fa36..10f4037c25b7ef54985bc3f0fc3fee9ac07ada1c 100644 (file)
@@ -388,11 +388,14 @@ class CRM_Profile_Page_Dynamic extends CRM_Core_Page {
   }
 
   /**
-   * @param string $suffix
+   * Check template file exists.
    *
-   * @return null|string
+   * @param string|null $suffix
+   *
+   * @return string|null
+   *   Template file path, else null
    */
-  public function checkTemplateFileExists($suffix = '') {
+  public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_gid) {
       $templateFile = "CRM/Profile/Page/{$this->_gid}/Dynamic.{$suffix}tpl";
       $template = CRM_Core_Page::getTemplate();
index ab05516edf481c6cb1cec304b5aab1bb69a91790..0cec9a36ba272ca4e67bd44e3ce9744c3305e722 100644 (file)
@@ -449,11 +449,14 @@ class CRM_Profile_Page_Listings extends CRM_Core_Page {
   }
 
   /**
-   * @param string $suffix
+   * Check template file exists.
    *
-   * @return null|string
+   * @param string|null $suffix
+   *
+   * @return string|null
+   *   Template file path, else null
    */
-  public function checkTemplateFileExists($suffix = '') {
+  public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_gid) {
       $templateFile = "CRM/Profile/Page/{$this->_gid}/Listings.{$suffix}tpl";
       $template = CRM_Core_Page::getTemplate();
index 185980e8ed6f2a44630ab11ca54795ac0752655e..90d835149640985d2e5bd4ca2ce80183cc3c81ff 100644 (file)
@@ -161,11 +161,14 @@ class CRM_Profile_Page_View extends CRM_Core_Page {
   }
 
   /**
-   * @param string $suffix
+   * Check template file exists.
    *
-   * @return null|string
+   * @param string|null $suffix
+   *
+   * @return string|null
+   *   Template file path, else null
    */
-  public function checkTemplateFileExists($suffix = '') {
+  public function checkTemplateFileExists($suffix = NULL) {
     if ($this->_gid) {
       $templateFile = "CRM/Profile/Page/{$this->_gid}/View.{$suffix}tpl";
       $template = CRM_Core_Page::getTemplate();