INFRA-132 - tests/ - PHPStorm cleanup
[civicrm-core.git] / tests / phpunit / CRM / Contact / BAO / GroupContactCacheTest.php
index 1995dc0aa0a93b97d006fcaf9bb6f0ec473e149d..76561d3ede34b84b8b2bfc900bdf4681529053b7 100644 (file)
@@ -32,7 +32,7 @@ require_once 'CiviTest/Contact.php';
 /**
  * Test class for CRM_Contact_BAO_GroupContact BAO
  *
- *  @package   CiviCRM
+ * @package   CiviCRM
  */
 class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
 
@@ -86,7 +86,11 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
     $this->assertAPISuccess($result);
     CRM_Contact_BAO_GroupContactCache::load($group, TRUE);
     $this->assertCacheMatches(
-      array(/* deceased[0], */ $deceased[1]->id, $deceased[2]->id, $living[0]->id),
+      array(/* deceased[0], */
+        $deceased[1]->id,
+        $deceased[2]->id,
+        $living[0]->id
+      ),
       $group->id
     );
   }
@@ -146,7 +150,10 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
     // Assert $c1 not in $parent
     CRM_Contact_BAO_GroupContactCache::load($parent, TRUE);
     $this->assertCacheMatches(
-      array( /* deceased[0], */ $deceased[1]->id, $deceased[2]->id),
+      array(/* deceased[0], */
+        $deceased[1]->id,
+        $deceased[2]->id
+      ),
       $parent->id
     );
 
@@ -164,8 +171,9 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
   /**
    * Assert that the cache for a group contains exactly the listed contacts
    *
-   * @param $expectedContactIds array(int)
-   * @param $groupId int
+   * @param array $expectedContactIds
+   *   Array(int).
+   * @param int $groupId
    */
   public function assertCacheMatches($expectedContactIds, $groupId) {
     $sql = 'SELECT contact_id FROM civicrm_group_contact_cache WHERE group_id = %1';
@@ -191,7 +199,6 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
   /**
    * Sets up the fixture, for example, opens a network connection.
    * This method is called before a test is executed.
-   *
    */
   protected function setUp() {
     $this->_testObjects = array();
@@ -201,7 +208,6 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
   /**
    * Tears down the fixture, for example, closes a network connection.
    * This method is called after a test is executed.
-   *
    */
   protected function tearDown() {
     parent::tearDown();
@@ -214,19 +220,20 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase {
    *
    * @see CRM_Core_DAO::createTestObject
    */
-  function createTestObject($daoName, $params = array(
-    ), $numObjects = 1, $createOnly = FALSE) {
+  function createTestObject($daoName, $params = array(), $numObjects = 1, $createOnly = FALSE) {
     $objects = CRM_Core_DAO::createTestObject($daoName, $params, $numObjects, $createOnly);
     if (is_array($objects)) {
       $this->registerTestObjects($objects);
-    } else {
+    }
+    else {
       $this->registerTestObjects(array($objects));
     }
     return $objects;
   }
 
   /**
-   * @param $objects array DAO or BAO objects
+   * @param array $objects
+   *   DAO or BAO objects.
    */
   public function registerTestObjects($objects) {
     //if (is_object($objects)) {