Passed
Push — master ( 026b7a...094860 )
by Matthew
06:32
created

StubLiveJobsGridSource   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 23
ccs 0
cts 9
cp 0
rs 10
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getId() 0 3 2
A setRunning() 0 3 1
A isRunning() 0 3 1
1
<?php
2
3
namespace Dtc\QueueBundle\ODM;
4
5
class StubLiveJobsGridSource
6
{
7
    protected $jobManager;
8
    protected $running = false;
9
10
    public function getId()
11
    {
12
        return 'dtc_queue.grid_source.jobs_'.($this->isRunning() ? 'running' : 'waiting').'.odm';
13
    }
14
15
    public function setRunning($flag)
16
    {
17
        $this->running = $flag;
18
    }
19
20
    public function isRunning()
21
    {
22
        return $this->running;
23
    }
24
25
    public function __construct(JobManager $jobManager)
26
    {
27
        $this->jobManager = $jobManager;
28
    }
29
}
30