Completed
Push — master ( 859c70...b3ba31 )
by Matthew
06:19
created

AbstractJobManager   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 1
dl 0
loc 58
ccs 18
cts 18
cp 1
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
getJob() 0 1 ?
save() 0 1 ?
A resetStalledJobs() 0 4 1
A pruneStalledJobs() 0 4 1
A resetErroneousJobs() 0 4 1
A getStatus() 0 4 1
A getJobCount() 0 4 1
A deleteJob() 0 4 1
A pruneExpiredJobs() 0 4 1
saveHistory() 0 1 ?
A pruneErroneousJobs() 0 4 1
A pruneArchivedJobs() 0 4 1
1
<?php
2
3
namespace Dtc\QueueBundle\Model;
4
5
use Dtc\QueueBundle\Exception\UnsupportedException;
6
7
abstract class AbstractJobManager implements JobManagerInterface
8
{
9
    abstract public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null);
10
11
    abstract public function save(Job $job);
12
13
    abstract public function saveHistory(Job $job);
14
15 3
    public function resetStalledJobs($workerName = null, $method = null)
16
    {
17 3
        throw new UnsupportedException('Unsupported');
18
    }
19
20 3
    public function pruneStalledJobs($workerName = null, $method = null)
21
    {
22 3
        throw new UnsupportedException('Unsupported');
23
    }
24
25 3
    public function resetErroneousJobs($workerName = null, $methodName = null)
26
    {
27 3
        throw new UnsupportedException('Unsupported');
28
    }
29
30 3
    public function pruneErroneousJobs($workerName = null, $methodName = null)
31
    {
32 3
        throw new UnsupportedException('Unsupported');
33
    }
34
35
    /**
36
     * @return array
37
     *
38
     * @throws UnsupportedException
39
     */
40 2
    public function getStatus()
41
    {
42 2
        throw new UnsupportedException('Unsupported');
43
    }
44
45 2
    public function getJobCount($workerName = null, $methodName = null)
46
    {
47 2
        throw new UnsupportedException('Unsupported');
48
    }
49
50 1
    public function deleteJob(Job $job)
51
    {
52 1
        throw new UnsupportedException('Unsupported');
53
    }
54
55 3
    public function pruneExpiredJobs($workerName = null, $methodName = null)
56
    {
57 3
        throw new UnsupportedException('Unsupported');
58
    }
59
60 3
    public function pruneArchivedJobs(\DateTime $olderThan)
61
    {
62 3
        throw new UnsupportedException('Unsupported');
63
    }
64
}
65