From: Tim Otten Date: Thu, 25 Jul 2019 16:53:42 +0000 (-0700) Subject: DAOTest - Use docblock for type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b53c8db92fb2d95d362f34a8521c72ccfe030f17;p=civicrm-core.git DAOTest - Use docblock for type This patch is going in as part of some cleanup/refactoring in a mid-cycle change. Using the docblock allows the type to be communicated without breaking on mid-cycle contract change. --- diff --git a/tests/phpunit/CRM/Core/DAOTest.php b/tests/phpunit/CRM/Core/DAOTest.php index 667a7e1943..32e8e38bab 100644 --- a/tests/phpunit/CRM/Core/DAOTest.php +++ b/tests/phpunit/CRM/Core/DAOTest.php @@ -483,7 +483,10 @@ class CRM_Core_DAOTest extends CiviUnitTestCase { * @throws \Exception */ public function testModifyQuery() { - $listener = function(\Symfony\Component\EventDispatcher\Event $e) { + /** + * @param \Civi\Core\Event\QueryEvent $e + */ + $listener = function($e) { $e->query = '/* User : hooked */' . $e->query; }; Civi::dispatcher()->addListener('civi.db.query', $listener); @@ -498,6 +501,9 @@ class CRM_Core_DAOTest extends CiviUnitTestCase { * Demonstrate it is modified showing the query now breaks. */ public function testModifyAndBreakQuery() { + /** + * @param \Civi\Core\Event\QueryEvent $e + */ $listener = function($e) { $e->query = '/* Forgot trailing comment marker' . $e->query; };