MyCustomFailerConfigurator::scheme()   A
last analyzed

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
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