Civi/Token - Fix various PHPStorm warnings
authorTim Otten <totten@civicrm.org>
Tue, 10 Jan 2017 00:44:59 +0000 (16:44 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 10 Jan 2017 01:02:28 +0000 (17:02 -0800)
Civi/Token/TokenCompatSubscriber.php
Civi/Token/TokenRow.php

index 3eaf57d3b7cc6ac6d92ccf948c9647a45825767b..e6c2f72e65f2a1d17c819a9d7f261d72a6b5c5e0 100644 (file)
@@ -49,6 +49,7 @@ class TokenCompatSubscriber implements EventSubscriberInterface {
     $messageTokens = $e->getTokenProcessor()->getMessageTokens();
 
     foreach ($e->getRows() as $row) {
+      /** @var int $contactId */
       $contactId = $row->context['contactId'];
       if (empty($row->context['contact'])) {
         $params = array(
index a18a81c43533f2cead6445beee58411c44a65ee8..3c77f31d129afaa5b518ed671aa141de07195c28 100644 (file)
@@ -134,6 +134,8 @@ class TokenRow {
    * @param string $baoName
    * @param array $baoField
    * @param mixed $fieldValue
+   * @return TokenRow
+   * @throws \CRM_Core_Exception
    */
   public function dbToken($tokenEntity, $tokenField, $baoName, $baoField, $fieldValue) {
     if ($fieldValue === NULL || $fieldValue === '') {