Renamed CommunicationRecipientType.php to EncryptionMessageRecipient.php
This commit is contained in:
parent
4a2a307fed
commit
28a5cb9b07
2 changed files with 23 additions and 9 deletions
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Socialbox\Enums\Types;
|
|
||||||
|
|
||||||
enum CommunicationRecipientType : string
|
|
||||||
{
|
|
||||||
case SENDER = 'SENDER';
|
|
||||||
case RECEIVER = 'RECEIVER';
|
|
||||||
}
|
|
23
src/Socialbox/Enums/Types/EncryptionMessageRecipient.php
Normal file
23
src/Socialbox/Enums/Types/EncryptionMessageRecipient.php
Normal 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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue