Passed
Push — master ( b0f8c9...462be0 )
by Sébastien
03:24
created

FooReceiverFactory::create()   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 3
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Bdf\QueueBundle\Tests\Fixtures;
4
5
6
use Bdf\Queue\Consumer\Receiver\Builder\ReceiverFactory;
7
use Bdf\Queue\Consumer\ReceiverInterface;
8
use Bdf\QueueBundle\Consumption\ReceiverFactoryProviderInterface;
9
10
class FooReceiverFactory implements ReceiverFactoryProviderInterface
11
{
12
13
    public function getReceiverNames(): array
14
    {
15
        return ['foo'];
16
    }
17
18
    public function create(ReceiverFactory $factory, ReceiverInterface $receiver, ...$arguments): ReceiverInterface
19
    {
20
        return new FooReceiver($receiver, $arguments);
21
    }
22
}