Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
*/
class Message extends BaseMessage implements MessageWrapperInterface
{
private Email $email;
private string $charset = 'utf-8';
protected Email $email;
protected string $charset = 'utf-8';

/**
* @param array<string, mixed> $config
Expand All @@ -39,7 +39,7 @@
public function __construct(array $config = [])
{
$this->email = new Email();
parent::__construct($config);

Check warning on line 42 in src/Message.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function __construct(array $config = []) { $this->email = new Email(); - parent::__construct($config); + } public function __clone() {
}

public function __clone()
Expand Down Expand Up @@ -274,7 +274,7 @@
$name,
$options['contentType'] ?? FileHelper::getMimeType($fileName),
);
return 'cid:' . $name;

Check warning on line 277 in src/Message.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ { $name = $options['fileName'] ?? $fileName; $this->email->embedFromPath($fileName, $name, $options['contentType'] ?? FileHelper::getMimeType($fileName)); - return 'cid:' . $name; + return 'cid:'; } /** * @param resource|string $content
}

/**
Expand All @@ -288,7 +288,7 @@
throw new InvalidConfigException('A valid file name must be passed when embedding content');
}
$this->email->embed($content, $options['fileName'], $options['contentType'] ?? null);
return 'cid:' . $options['fileName'];

Check warning on line 291 in src/Message.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ throw new InvalidConfigException('A valid file name must be passed when embedding content'); } $this->email->embed($content, $options['fileName'], $options['contentType'] ?? null); - return 'cid:' . $options['fileName']; + return 'cid:'; } /** * @return list<string>
}

/**
Expand Down Expand Up @@ -391,7 +391,7 @@
if (!is_string($address)) {
// email address without name
$addresses[] = new Address($name);
continue;

Check warning on line 394 in src/Message.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ if (!is_string($address)) { // email address without name $addresses[] = new Address($name); - continue; + break; } $addresses[] = new Address($address, $name); }
}

$addresses[] = new Address($address, $name);
Expand Down
Loading