Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/FileMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DirectoryTree\ImapEngine;

use BackedEnum;
use BadMethodCallException;

class FileMessage implements MessageInterface
Expand All @@ -26,7 +27,7 @@ public function uid(): int
/**
* {@inheritDoc}
*/
public function flag(mixed $flag, string $operation, bool $expunge = false): void
public function flag(BackedEnum|string $flag, string $operation, bool $expunge = false): void
{
throw new BadMethodCallException('FileMessage does not support flagging');
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlaggableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ public function hasFlag(BackedEnum|string $flag): bool;
/**
* Add or remove a flag from the message.
*/
public function flag(mixed $flag, string $operation, bool $expunge = false): void;
public function flag(BackedEnum|string $flag, string $operation, bool $expunge = false): void;
}
2 changes: 1 addition & 1 deletion src/HasFlags.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ abstract public function flags(): array;
/**
* {@inheritDoc}
*/
abstract public function flag(mixed $flag, string $operation, bool $expunge = false): void;
abstract public function flag(BackedEnum|string $flag, string $operation, bool $expunge = false): void;
}
3 changes: 2 additions & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DirectoryTree\ImapEngine;

use BackedEnum;
use DirectoryTree\ImapEngine\Connection\Responses\MessageResponseParser;
use DirectoryTree\ImapEngine\Exceptions\ImapCapabilityException;
use DirectoryTree\ImapEngine\Support\Str;
Expand Down Expand Up @@ -103,7 +104,7 @@ public function is(MessageInterface $message): bool
/**
* Add or remove a flag from the message.
*/
public function flag(mixed $flag, string $operation, bool $expunge = false): void
public function flag(BackedEnum|string $flag, string $operation, bool $expunge = false): void
{
$flag = Str::enum($flag);

Expand Down
3 changes: 2 additions & 1 deletion src/Testing/FakeMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DirectoryTree\ImapEngine\Testing;

use BackedEnum;
use DirectoryTree\ImapEngine\HasFlags;
use DirectoryTree\ImapEngine\HasParsedMessage;
use DirectoryTree\ImapEngine\MessageInterface;
Expand Down Expand Up @@ -42,7 +43,7 @@ public function is(MessageInterface $message): bool
/**
* {@inheritDoc}
*/
public function flag(mixed $flag, string $operation, bool $expunge = false): void
public function flag(BackedEnum|string $flag, string $operation, bool $expunge = false): void
{
$flag = Str::enum($flag);

Expand Down