DoctrineWorker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSerializedCommandData() 0 4 1
A getSubsystemName() 0 4 1
1
<?php
2
3
namespace Gendoria\CommandQueueDoctrineDriverBundle\Worker;
4
5
use Gendoria\CommandQueue\Serializer\SerializedCommandData;
6
use Gendoria\CommandQueueBundle\Worker\BaseSymfonyWorker;
7
8
/**
9
 * Doctrine worker
10
 *
11
 * @author Tomasz Struczyński <[email protected]>
12
 */
13
class DoctrineWorker extends BaseSymfonyWorker
14
{
15
    /**
16
     * Subsystem name.
17
     * 
18
     * @var string
19
     */
20
    const SUBSYSTEM_NAME = 'DoctrineWorker';
21
    
22
    /**
23
     * {@inheritdoc}
24
     * @param array $commandData
25
     */
26 1
    protected function getSerializedCommandData($commandData)
27
    {
28 1
        return new SerializedCommandData($commandData['command'], $commandData['command_class']);
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34 2
    public function getSubsystemName()
35
    {
36 2
        return self::SUBSYSTEM_NAME;
37
    }
38
}
39