Renamed CommunicationRecipientType.php to EncryptionMessageRecipient.php

This commit is contained in:
netkas 2025-02-21 22:59:10 -05:00
parent 4a2a307fed
commit 28a5cb9b07
2 changed files with 23 additions and 9 deletions

View file

@ -1,9 +0,0 @@
<?php
namespace Socialbox\Enums\Types;
enum CommunicationRecipientType : string
{
case SENDER = 'SENDER';
case RECEIVER = 'RECEIVER';
}

View file

@ -0,0 +1,23 @@
<?php
namespace Socialbox\Enums\Types;
enum EncryptionMessageRecipient : string
{
case SENDER = 'SENDER';
case RECEIVER = 'RECEIVER';
/**
* Reverses the role of the recipient
*
* @return EncryptionMessageRecipient
*/
public function reverse(): EncryptionMessageRecipient
{
return match($this)
{
self::SENDER => self::RECEIVER,
self::RECEIVER => self::SENDER
};
}
}