(NFC) PHPdoc fixes and improvements
authorBradley Taylor <hello@brad-taylor.co.uk>
Mon, 10 Apr 2023 09:00:24 +0000 (10:00 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Mon, 10 Apr 2023 09:00:24 +0000 (10:00 +0100)
CRM/Price/BAO/LineItem.php
tests/phpunit/CRM/Contact/Form/Task/AddToGroupTest.php
tests/phpunit/CRM/Contact/Form/Task/PrintMailingLabelTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v4/Mock/Api4/MockArrayEntity.php

index 1c2a7d0f0cab0908833fac34832850e006a261dd..64823e5599e9f6d5773bc67cdb1703b6d32a147a 100644 (file)
@@ -812,7 +812,7 @@ WHERE li.contribution_id = %1";
 
   /**
    * Helper function to return sum of financial item's amount related to a line-item
-   * @param array $lineItemID
+   * @param int $lineItemID
    *
    * @return float $financialItem
    */
index 704643b95cb4712cc3c63a20d5c6b8bc05ed9dee..9d1a8edcadb0b9802cfdf53754236887e2269b00 100644 (file)
@@ -18,6 +18,10 @@ class CRM_Contact_Form_Task_AddToGroupTest extends CiviUnitTestCase {
     parent::setUp();
   }
 
+  /**
+   * @param array $formValues
+   * @return CRM_Contact_Form_Task_AddToGroup
+   */
   protected function getSearchTaskFormObject(array $formValues) {
     $_POST = $formValues;
     $_SERVER['REQUEST_METHOD'] = 'GET';
index 4c310d1136e178fa5b52fde0cbc67fef7226ed39..191406ff618c060d569eb6278c3966f15a209d83 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Contact_Form_Task_PrintMailingLabelTest extends CiviUnitTestCase {
       }
     }
 
-    /* @var CRM_Contact_Form_Task_Label $fom */
+    /** @var CRM_Contact_Form_Task_Label $form */
     $form = $this->getFormObject('CRM_Contact_Form_Task_Label', [
       'label_name' => 3475,
       'location_type_id' => NULL,
index 128680d30627a0a1bda44ee192df3b6c648c6259..134f3580802766168e5327ade1020b7277e84b34 100644 (file)
@@ -622,9 +622,9 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
   /**
    * @param string $name
    *
-   * @return mixed
+   * @return int
    */
-  public function membershipStatusCreate($name = 'test member status') {
+  public function membershipStatusCreate($name = 'test member status'): int {
     $params['name'] = $name;
     $params['start_event'] = 'start_date';
     $params['end_event'] = 'end_date';
index 430d49bd0eca62f0b2189d4cfcc28c5f9f6e0ed6..cc8e4cf636c8175d9f1cb329a799afb32e03fd03 100644 (file)
@@ -21,7 +21,7 @@ namespace Civi\Api4;
 /**
  * MockArrayEntity entity.
  *
- * @method Generic\BasicGetAction get()
+ * @method static Generic\BasicGetAction get()
  *
  * @package Civi\Api4
  */