Completed
Push — main ( 083b32...2bbe13 )
by Michael
15s queued 12s
created

MailerTestTransportFactory::getSupportedSchemes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Licensed under MIT. See file /LICENSE.
7
 */
8
9
namespace App\Factory;
10
11
use App\Service\MailerTestTransport;
12
use Symfony\Component\Mailer\Transport\AbstractTransportFactory;
13
use Symfony\Component\Mailer\Transport\Dsn;
14
use Symfony\Component\Mailer\Transport\TransportInterface;
15
16
final class MailerTestTransportFactory extends AbstractTransportFactory
17
{
18
    public function create(Dsn $dsn): TransportInterface
19
    {
20
        return new MailerTestTransport();
21
    }
22
23
    protected function getSupportedSchemes(): array
24
    {
25
        return ['testonly'];
26
    }
27
}
28