package and depencies
This commit is contained in:
@@ -17,8 +17,8 @@ use Symfony\Component\Mime\RawMessage;
|
||||
|
||||
final class EmailAttachmentCount extends Constraint
|
||||
{
|
||||
private $expectedValue;
|
||||
private $transport;
|
||||
private int $expectedValue;
|
||||
private ?string $transport;
|
||||
|
||||
public function __construct(int $expectedValue, string $transport = null)
|
||||
{
|
||||
@@ -26,9 +26,6 @@ final class EmailAttachmentCount extends Constraint
|
||||
$this->transport = $transport;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf('has sent "%d" attachment(s)', $this->expectedValue);
|
||||
@@ -36,12 +33,10 @@ final class EmailAttachmentCount extends Constraint
|
||||
|
||||
/**
|
||||
* @param RawMessage $message
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function matches($message): bool
|
||||
{
|
||||
if (RawMessage::class === \get_class($message) || Message::class === \get_class($message)) {
|
||||
if (RawMessage::class === $message::class || Message::class === $message::class) {
|
||||
throw new \LogicException('Unable to test a message attachment on a RawMessage or Message instance.');
|
||||
}
|
||||
|
||||
@@ -50,8 +45,6 @@ final class EmailAttachmentCount extends Constraint
|
||||
|
||||
/**
|
||||
* @param RawMessage $message
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function failureDescription($message): string
|
||||
{
|
||||
|
Reference in New Issue
Block a user