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

StubLiveJobsGridSource::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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