Passed
Push — master ( 109e7c...79a79c )
by Thomas Mauro
02:15
created

UnsupportedTransportFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
dl 0
loc 10
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 3 1
A createTransport() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TMV\Laminas\Messenger\Factory\Transport;
6
7
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
8
use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
9
use Symfony\Component\Messenger\Transport\TransportInterface;
10
use TMV\Laminas\Messenger\Exception\RuntimeException;
11
12
final class UnsupportedTransportFactory implements TransportFactoryInterface
13
{
14
    public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
15
    {
16
        throw new RuntimeException('Unsupported transport');
17
    }
18
19
    public function supports(string $dsn, array $options): bool
20
    {
21
        return false;
22
    }
23
}
24