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
8 changes: 4 additions & 4 deletions src/Protocol/Imap/Request/SequenceSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
final class SequenceSet
{
/**
* @var array<int, mixed>
* @var array<int, string>
*/
private $set = [];

private function __construct()
{
// this constructor is protected in order to force
Expand All @@ -23,7 +23,7 @@ private function __construct()
public function withSingle(int $number): self
{
$set = clone $this;
$set->set[] = $number;
$set->set[] = (string)$number;
return $set;
}

Expand Down Expand Up @@ -86,7 +86,7 @@ public static function single(int $number): self
public static function multiple(array $numbers): self
{
$set = new self();
$set->set = \array_map('strval', $numbers);
$set->set = \array_map(\strval(...), $numbers);
return $set;
}

Expand Down
3 changes: 1 addition & 2 deletions src/Protocol/Imap/TagFactory/GeneratorTagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class GeneratorTagFactory implements TagFactoryInterface
* @var \Generator|Tag[]
*/
private $iterator;

public function __construct()
{
$this->iterator = $this->newList();
Expand All @@ -37,7 +37,6 @@ private function newList(): \Generator
{
$i = 0;

/** @phpstan-ignore-next-line */
while (true) {
yield Tag::fromNonce(++$i);
}
Expand Down
Loading