• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

contributte / mail / 6690014969

28 Aug 2023 08:39AM UTC coverage: 72.84% (-0.7%) from 73.563%
6690014969

push

github

f3l1x
Exceptions: remove not used, and replace nette exception

59 of 81 relevant lines covered (72.84%)

0.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/src/Mailer/TraceableMailer.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\Mail\Mailer;
4

5
use Nette\Mail\Mailer;
6
use Nette\Mail\Message;
7

8
class TraceableMailer implements Mailer
9
{
10

11
        /** @var array<Message> */
12
        private array $mails = [];
13

14
        public function __construct(private Mailer $mailer)
1✔
15
        {
16
        }
1✔
17

18
        public function send(Message $mail): void
19
        {
20
                // Trace sent mails
21
                $this->mails[] = $mail;
×
22

23
                // Delegate to original mailer
24
                $this->mailer->send($mail);
×
25
        }
26

27
        /**
28
         * @return array<Message>
29
         */
30
        public function getMails(): array
31
        {
32
                return $this->mails;
×
33
        }
34

35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc