DoctrineWorker::getSerializedCommandData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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