Move the direction constants from SmsMessageEntityInterface to a dedicated final class.

interface SmsMessageInterface {
  const DIRECTION_OUTGOING = 1;
  const DIRECTION_INCOMING = -1;
}

\Drupal\Core\Routing\RoutingEvents is a good example of a standalone final class with only constants.

CommentFileSizeAuthor
#3 direction-class-2724807.patch29.86 KBdpi

Comments

dpi created an issue. See original summary.

dpi’s picture

Issue tags: +beta blocker

API modification

dpi’s picture

Status: Active » Needs review
StatusFileSize
new29.86 KB

  • dpi committed 5aab0c4 on 8.x-1.x
    Issue #2724807 by dpi: Move direction constants to dedicated class
    
dpi’s picture

Status: Needs review » Fixed
almaudoh’s picture

We could use this same pattern for the other constants in SmsGatewayPluginInterface and Message\SmsMessageInterface for message status.

I observed that our "normal practice" of prefixing with Sms... wasn't done here...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.