Correctly document CRM_Utils_Hook::pre to allow null ID
authorBradley Taylor <hello@brad-taylor.co.uk>
Tue, 18 Jan 2022 20:27:39 +0000 (20:27 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Tue, 18 Jan 2022 20:27:39 +0000 (20:27 +0000)
CRM/Utils/Hook.php
Civi/Core/Event/PreEvent.php

index a67f2a9efc751e4bc7550eb306192c09ca8a316f..b7f65ff36f41ed8dccb1395b232ac31447651786 100644 (file)
@@ -331,7 +331,7 @@ abstract class CRM_Utils_Hook {
    *   The type of operation being performed.
    * @param string $objectName
    *   The name of the object.
-   * @param int $id
+   * @param int|null $id
    *   The object id if available.
    * @param array $params
    *   The parameters used for object creation / editing.
index db25c344e09538779d9e8ca5e666665d0d7943d8..444739b1c314cfca383f4a37df80271d054be3fc 100644 (file)
@@ -44,7 +44,7 @@ class PreEvent extends GenericHookEvent {
    *
    * @param string $action
    * @param string $entity
-   * @param int $id
+   * @param int|null $id
    * @param array $params
    */
   public function __construct($action, $entity, $id, &$params) {