[REF][PHP8.1] Add in type hints to fix deprecations and add in #[\ReturnTypeWillChang...
[civicrm-core.git] / ext / eventcart / CRM / Event / Cart / BAO / EventInCart.php
index 97cc92d256df8cc320a2378535b7afcf1b9dfad7..b06844e7c590283c26e1ee20d6a331a7ec92ca15 100644 (file)
@@ -222,7 +222,7 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl
    *
    * @return bool
    */
-  public function offsetExists($offset) {
+  public function offsetExists($offset): bool {
     return array_key_exists(array_merge($this->fields(), ['main_conference_event_id']), $offset);
   }
 
@@ -231,6 +231,7 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl
    *
    * @return int
    */
+  #[\ReturnTypeWillChange]
   public function offsetGet($offset) {
     if ($offset == 'event') {
       return $this->event->toArray();
@@ -249,13 +250,13 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl
    * @param mixed $offset
    * @param mixed $value
    */
-  public function offsetSet($offset, $value) {
+  public function offsetSet($offset, $value): void {
   }
 
   /**
    * @param mixed $offset
    */
-  public function offsetUnset($offset) {
+  public function offsetUnset($offset): void {
   }
 
   /**