Incorrect return type in loadEnabledByCode definition.

Created on 27 June 2023, over 1 year ago

Describe your bug or feature request.

The CouponStorageInterface defines the return type of the method loadEnabledByCode as CouponInterface, but the method returns FALSE if no such code is found.

I would return NULL, if no coupon is found (like EntityStorageInterface::load()) and change the return type to
* @return \Drupal\commerce_promotion\Entity\CouponInterface|null.

🐛 Bug report
Status

Active

Version

2.0

Component

Promotions

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024