Completed
Pull Request — master (#40)
by Matthew
17:20
created

StubJobManager::getJobCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Dtc\QueueBundle\Tests;
4
5
use Dtc\QueueBundle\Manager\StallableJobManager;
6
use Dtc\QueueBundle\Model\Job;
7
use Dtc\QueueBundle\Model\RetryableJob;
8
use Dtc\QueueBundle\Model\StallableJob;
9
10
class StubJobManager extends StallableJobManager
11
{
12
    use RecordingTrait;
13
14
    public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null)
15
    {
16
        return $this->recordArgs(__FUNCTION__, func_get_args());
17
    }
18
19
    public function saveHistory(Job $job)
20
    {
21
        return $this->recordArgs(__FUNCTION__, func_get_args());
22
    }
23
24
    public function save(Job $job)
25
    {
26
        return $this->recordArgs(__FUNCTION__, func_get_args());
27
    }
28
29
    protected function stallableSave(StallableJob $job)
30
    {
31
        return $this->recordArgs(__FUNCTION__, func_get_args());
32
    }
33
34
    protected function resetJob(RetryableJob $job)
35
    {
36
        return $this->recordArgs(__FUNCTION__, func_get_args());
37
    }
38
39
    protected function stallableSaveHistory(StallableJob $job, $retry)
40
    {
41
        return $this->recordArgs(__FUNCTION__, func_get_args());
42
    }
43
44
    public function pruneArchivedJobs(\DateTime $olderThan)
45
    {
46
        return $this->recordArgs(__FUNCTION__, func_get_args());
47
    }
48
49
    public function pruneExpiredJobs($workerName = null, $methodName = null)
50
    {
51
        return $this->recordArgs(__FUNCTION__, func_get_args());
52
    }
53
54
    public function pruneErroneousJobs($workerName = null, $methodName = null)
0 ignored issues
show
Unused Code introduced by
The parameter $workerName is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $methodName is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
55
    {
56
        return $this->recordArgs(__FUNCTION__, func_get_args());
57
    }
58
59
    public function pruneStalledJobs($workerName = null, $method = null, callable $progressCallback = null)
60
    {
61
        return $this->recordArgs(__FUNCTION__, func_get_args());
62
    }
63
64
    public function deleteJob(Job $job)
65
    {
66
        return $this->recordArgs(__FUNCTION__, func_get_args());
67
    }
68
69
    public function getWaitingJobCount($workerName = null, $methodName = null)
70
    {
71
        return $this->recordArgs(__FUNCTION__, func_get_args());
72
    }
73
74
    public function getStatus()
75
    {
76
        return $this->recordArgs(__FUNCTION__, func_get_args());
77
    }
78
79
    public function resetExceptionJobs($workerName = null, $methodName = null)
80
    {
81
        return $this->recordArgs(__FUNCTION__, func_get_args());
82
    }
83
84
    public function resetStalledJobs($workerName = null, $method = null, callable $progressCallback = null)
85
    {
86
        return $this->recordArgs(__FUNCTION__, func_get_args());
87
    }
88
}
89