MyCustomFailerConfigurator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A scheme() 0 3 1
A configure() 0 8 1
A available() 0 3 1
1
<?php
2
3
namespace Bdf\QueueBundle\Tests\Fixtures;
4
5
use Bdf\Dsn\DsnRequest;
6
use Bdf\Queue\Failer\MemoryFailedJobRepository;
7
use Bdf\QueueBundle\DependencyInjection\Failer\FailerDriverConfiguratorInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
10
class MyCustomFailerConfigurator implements FailerDriverConfiguratorInterface
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function scheme(): string
16
    {
17
        return 'custom';
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function available(ContainerBuilder $container): bool
24
    {
25
        return true;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function configure(DsnRequest $dsn, ContainerBuilder $container): string
32
    {
33
        $container->register('foo')
34
            ->setClass(MemoryFailedJobRepository::class)
35
            ->setPublic(true)
36
        ;
37
38
        return 'foo';
39
    }
40
}
41