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\ORM;
4
5
class StubLiveJobsGridSource
6
{
7
    protected $jobManager;
8
    protected $running = false;
9
    private $columnSource;
0 ignored issues
show
introduced by
The private property $columnSource is not used, and could be removed.
Loading history...
10
11
    public function getId()
12
    {
13
        return 'dtc_queue.grid_source.jobs_'.($this->isRunning() ? 'running' : 'waiting').'.orm';
14
    }
15
16
    public function __construct(JobManager $jobManager)
17
    {
18
        $this->jobManager = $jobManager;
19
    }
20
21
    /**
22
     * @param bool $flag
23
     */
24
    public function setRunning($flag)
25
    {
26
        $this->running = $flag;
27
    }
28
29
    public function isRunning()
30
    {
31
        return $this->running;
32
    }
33
}
34